From 730485e43afd1ec0b513dea214b5027bc328da14 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Fri, 30 Dec 2022 22:44:25 +0200 Subject: [PATCH] Added full support of Bot API 6.4 (#1088) * Remove warnings about pytest asyncio mode * Update Bot API to 6.4 * Bump version * Added changelog * Update translations --- .apiversion | 2 +- .../closeGeneralForumTopic/entity.json | 27 ++ .butcher/methods/editForumTopic/entity.json | 16 +- .../methods/editGeneralForumTopic/entity.json | 35 +++ .butcher/methods/getChatMember/entity.json | 6 +- .../methods/hideGeneralForumTopic/entity.json | 27 ++ .../reopenGeneralForumTopic/entity.json | 27 ++ .butcher/methods/sendAnimation/entity.json | 8 + .butcher/methods/sendChatAction/entity.json | 8 + .butcher/methods/sendPhoto/entity.json | 8 + .butcher/methods/sendVideo/entity.json | 8 + .../unhideGeneralForumTopic/entity.json | 27 ++ .butcher/schema/schema.json | 297 +++++++++++++++++- .butcher/types/Chat/entity.json | 16 + .butcher/types/ForumTopicEdited/entity.json | 35 +++ .../types/GeneralForumTopicHidden/entity.json | 18 ++ .../GeneralForumTopicUnhidden/entity.json | 18 ++ .../types/InputMediaAnimation/entity.json | 8 + .butcher/types/InputMediaPhoto/entity.json | 8 + .butcher/types/InputMediaVideo/entity.json | 8 + .butcher/types/Message/entity.json | 40 +++ .../types/ReplyKeyboardMarkup/entity.json | 8 + .butcher/types/WriteAccessAllowed/entity.json | 18 ++ CHANGES/1088.feature.rst | 1 + README.rst | 4 +- aiogram/__init__.py | 2 +- aiogram/client/bot.py | 120 ++++++- aiogram/enums/content_type.py | 5 + aiogram/methods/__init__.py | 194 ++++++------ aiogram/methods/close_general_forum_topic.py | 26 ++ aiogram/methods/edit_forum_topic.py | 10 +- aiogram/methods/edit_general_forum_topic.py | 28 ++ aiogram/methods/get_chat_member.py | 2 +- aiogram/methods/hide_general_forum_topic.py | 26 ++ aiogram/methods/reopen_general_forum_topic.py | 26 ++ aiogram/methods/send_animation.py | 2 + aiogram/methods/send_chat_action.py | 4 +- aiogram/methods/send_photo.py | 2 + aiogram/methods/send_video.py | 2 + aiogram/methods/unhide_general_forum_topic.py | 26 ++ aiogram/types/__init__.py | 8 + aiogram/types/chat.py | 9 +- aiogram/types/forum_topic_edited.py | 16 + aiogram/types/general_forum_topic_hidden.py | 9 + aiogram/types/general_forum_topic_unhidden.py | 9 + aiogram/types/input_media_animation.py | 2 + aiogram/types/input_media_photo.py | 2 + aiogram/types/input_media_video.py | 2 + aiogram/types/message.py | 32 ++ aiogram/types/reply_keyboard_markup.py | 2 + aiogram/types/write_access_allowed.py | 9 + .../api/methods/close_general_forum_topic.rst | 44 +++ docs/api/methods/edit_general_forum_topic.rst | 44 +++ docs/api/methods/hide_general_forum_topic.rst | 44 +++ docs/api/methods/index.rst | 5 + .../methods/reopen_general_forum_topic.rst | 44 +++ .../methods/unhide_general_forum_topic.rst | 44 +++ docs/api/types/forum_topic_edited.rst | 9 + docs/api/types/general_forum_topic_hidden.rst | 9 + .../types/general_forum_topic_unhidden.rst | 9 + docs/api/types/index.rst | 4 + docs/api/types/write_access_allowed.rst | 9 + docs/locale/en/LC_MESSAGES/api/bot.po | 200 +++++++++--- .../en/LC_MESSAGES/api/download_file.po | 9 +- docs/locale/en/LC_MESSAGES/api/enums/index.po | 7 +- .../api/methods/edit_forum_topic.po | 21 +- .../api/methods/get_chat_member.po | 15 +- .../LC_MESSAGES/api/methods/send_animation.po | 9 +- .../api/methods/send_chat_action.po | 7 +- .../en/LC_MESSAGES/api/methods/send_photo.po | 8 +- .../en/LC_MESSAGES/api/methods/send_video.po | 8 +- docs/locale/en/LC_MESSAGES/api/types/chat.po | 34 +- .../en/LC_MESSAGES/api/types/error_event.po | 6 +- docs/locale/en/LC_MESSAGES/api/types/index.po | 16 +- .../api/types/input_media_animation.po | 9 +- .../api/types/input_media_photo.po | 9 +- .../api/types/input_media_video.po | 9 +- .../en/LC_MESSAGES/api/types/message.po | 115 +++++-- .../api/types/reply_keyboard_markup.po | 10 +- docs/locale/en/LC_MESSAGES/changelog.po | 109 ++++++- docs/locale/en/LC_MESSAGES/index.po | 11 +- docs/locale/uk_UA/LC_MESSAGES/api/bot.po | 200 +++++++++--- .../uk_UA/LC_MESSAGES/api/download_file.po | 102 +++--- .../uk_UA/LC_MESSAGES/api/enums/index.po | 7 +- .../api/methods/edit_forum_topic.po | 21 +- .../api/methods/get_chat_member.po | 15 +- .../LC_MESSAGES/api/methods/send_animation.po | 9 +- .../api/methods/send_chat_action.po | 7 +- .../LC_MESSAGES/api/methods/send_photo.po | 8 +- .../LC_MESSAGES/api/methods/send_video.po | 8 +- .../uk_UA/LC_MESSAGES/api/types/chat.po | 34 +- .../LC_MESSAGES/api/types/error_event.po | 6 +- .../uk_UA/LC_MESSAGES/api/types/index.po | 16 +- .../api/types/input_media_animation.po | 9 +- .../api/types/input_media_photo.po | 9 +- .../api/types/input_media_video.po | 9 +- .../uk_UA/LC_MESSAGES/api/types/message.po | 115 +++++-- .../api/types/reply_keyboard_markup.po | 10 +- docs/locale/uk_UA/LC_MESSAGES/changelog.po | 109 ++++++- docs/locale/uk_UA/LC_MESSAGES/index.po | 5 +- tests/test_api/test_client/test_bot.py | 2 - .../test_session/test_aiohttp_session.py | 2 - .../test_session/test_base_session.py | 2 - .../test_middlewares/test_request_logging.py | 4 - .../test_methods/test_add_sticker_to_set.py | 4 - .../test_answer_callback_query.py | 4 - .../test_methods/test_answer_inline_query.py | 4 - .../test_answer_pre_checkout_query.py | 4 - .../test_answer_shipping_query.py | 4 - .../test_methods/test_answer_web_app_query.py | 4 - .../test_approve_chat_join_request.py | 4 - .../test_methods/test_ban_chat_member.py | 4 - .../test_methods/test_ban_chat_sender_chat.py | 4 - tests/test_api/test_methods/test_base.py | 2 - tests/test_api/test_methods/test_close.py | 4 - .../test_methods/test_close_forum_topic.py | 4 - .../test_close_general_forum_topic.py | 20 ++ .../test_methods/test_copy_message.py | 4 - .../test_create_chat_invite_link.py | 4 - .../test_methods/test_create_forum_topic.py | 4 - .../test_methods/test_create_invoice_link.py | 4 - .../test_create_new_sticker_set.py | 4 - .../test_decline_chat_join_request.py | 4 - .../test_methods/test_delete_chat_photo.py | 4 - .../test_delete_chat_sticker_set.py | 4 - .../test_methods/test_delete_forum_topic.py | 4 - .../test_methods/test_delete_message.py | 4 - .../test_methods/test_delete_my_commands.py | 4 - .../test_delete_sticker_from_set.py | 4 - .../test_methods/test_delete_webhook.py | 4 - .../test_edit_chat_invite_link.py | 4 - .../test_methods/test_edit_forum_topic.py | 4 - .../test_edit_general_forum_topic.py | 20 ++ .../test_methods/test_edit_message_caption.py | 4 - .../test_edit_message_live_location.py | 4 - .../test_methods/test_edit_message_media.py | 4 - .../test_edit_message_reply_markup.py | 4 - .../test_methods/test_edit_message_text.py | 4 - .../test_export_chat_invite_link.py | 4 - .../test_methods/test_forward_message.py | 4 - tests/test_api/test_methods/test_get_chat.py | 4 - .../test_get_chat_administrators.py | 4 - .../test_methods/test_get_chat_member.py | 4 - .../test_get_chat_member_count.py | 4 - .../test_methods/test_get_chat_menu_button.py | 4 - .../test_get_custom_emoji_stickers.py | 4 - tests/test_api/test_methods/test_get_file.py | 4 - .../test_get_forum_topic_icon_stickers.py | 4 - .../test_methods/test_get_game_high_scores.py | 4 - tests/test_api/test_methods/test_get_me.py | 4 - .../test_methods/test_get_my_commands.py | 4 - ...est_get_my_default_administrator_rights.py | 4 - .../test_methods/test_get_sticker_set.py | 4 - .../test_api/test_methods/test_get_updates.py | 4 - .../test_get_user_profile_photos.py | 4 - .../test_methods/test_get_webhook_info.py | 4 - .../test_hide_general_forum_topic.py | 20 ++ .../test_api/test_methods/test_leave_chat.py | 4 - tests/test_api/test_methods/test_log_out.py | 4 - .../test_methods/test_pin_chat_message.py | 4 - .../test_methods/test_promote_chat_member.py | 4 - .../test_methods/test_reopen_forum_topic.py | 4 - .../test_reopen_general_forum_topic.py | 20 ++ .../test_methods/test_restrict_chat_member.py | 4 - .../test_revoke_chat_invite_link.py | 4 - .../test_methods/test_send_animation.py | 4 - .../test_api/test_methods/test_send_audio.py | 4 - .../test_methods/test_send_chat_action.py | 4 - .../test_methods/test_send_contact.py | 4 - tests/test_api/test_methods/test_send_dice.py | 4 - .../test_methods/test_send_document.py | 4 - tests/test_api/test_methods/test_send_game.py | 4 - .../test_methods/test_send_invoice.py | 4 - .../test_methods/test_send_location.py | 4 - .../test_methods/test_send_media_group.py | 4 - .../test_methods/test_send_message.py | 4 - .../test_api/test_methods/test_send_photo.py | 4 - tests/test_api/test_methods/test_send_poll.py | 4 - .../test_methods/test_send_sticker.py | 4 - .../test_api/test_methods/test_send_venue.py | 4 - .../test_api/test_methods/test_send_video.py | 4 - .../test_methods/test_send_video_note.py | 4 - .../test_api/test_methods/test_send_voice.py | 4 - ...est_set_chat_administrator_custom_title.py | 4 - .../test_methods/test_set_chat_description.py | 4 - .../test_methods/test_set_chat_menu_button.py | 4 - .../test_methods/test_set_chat_permissions.py | 4 - .../test_methods/test_set_chat_photo.py | 4 - .../test_methods/test_set_chat_sticker_set.py | 4 - .../test_methods/test_set_chat_title.py | 4 - .../test_methods/test_set_game_score.py | 4 - .../test_methods/test_set_my_commands.py | 4 - ...est_set_my_default_administrator_rights.py | 4 - .../test_set_passport_data_errors.py | 4 - .../test_set_sticker_position_in_set.py | 4 - .../test_set_sticker_set_thumb.py | 4 - .../test_api/test_methods/test_set_webhook.py | 4 - .../test_stop_message_live_location.py | 4 - tests/test_api/test_methods/test_stop_poll.py | 4 - .../test_methods/test_unban_chat_member.py | 4 - .../test_unban_chat_sender_chat.py | 4 - .../test_unhide_general_forum_topic.py | 20 ++ .../test_unpin_all_chat_messages.py | 4 - .../test_unpin_all_forum_topic_messages.py | 4 - .../test_methods/test_unpin_chat_message.py | 4 - .../test_methods/test_upload_sticker_file.py | 4 - tests/test_api/test_types/test_input_file.py | 3 - tests/test_dispatcher/test_dispatcher.py | 2 - .../test_dispatcher/test_event/test_event.py | 2 - .../test_event/test_handler.py | 2 - .../test_event/test_telegram.py | 3 - .../test_middlewares/test_user_context.py | 1 - tests/test_dispatcher/test_router.py | 2 - tests/test_filters/test_base.py | 4 - tests/test_filters/test_callback_data.py | 2 - .../test_filters/test_chat_member_updated.py | 1 - tests/test_filters/test_command.py | 2 - tests/test_filters/test_exception.py | 2 - tests/test_filters/test_magic_data.py | 2 - tests/test_filters/test_state.py | 5 - tests/test_filters/test_text.py | 2 - tests/test_fsm/storage/test_isolation.py | 2 - tests/test_fsm/storage/test_redis.py | 2 - tests/test_fsm/storage/test_storages.py | 2 - tests/test_fsm/test_context.py | 2 - tests/test_handler/test_base.py | 2 - tests/test_handler/test_callback_query.py | 4 - tests/test_handler/test_chat_member.py | 4 - .../test_handler/test_chosen_inline_result.py | 4 - tests/test_handler/test_error.py | 4 - tests/test_handler/test_inline_query.py | 4 - tests/test_handler/test_message.py | 4 - tests/test_handler/test_poll.py | 4 - tests/test_handler/test_pre_checkout_query.py | 4 - tests/test_handler/test_shipping_query.py | 4 - tests/test_utils/test_backoff.py | 1 - tests/test_utils/test_chat_action.py | 2 - tests/test_utils/test_deep_linking.py | 2 - tests/test_utils/test_i18n.py | 3 - 239 files changed, 2522 insertions(+), 892 deletions(-) create mode 100644 .butcher/methods/closeGeneralForumTopic/entity.json create mode 100644 .butcher/methods/editGeneralForumTopic/entity.json create mode 100644 .butcher/methods/hideGeneralForumTopic/entity.json create mode 100644 .butcher/methods/reopenGeneralForumTopic/entity.json create mode 100644 .butcher/methods/unhideGeneralForumTopic/entity.json create mode 100644 .butcher/types/ForumTopicEdited/entity.json create mode 100644 .butcher/types/GeneralForumTopicHidden/entity.json create mode 100644 .butcher/types/GeneralForumTopicUnhidden/entity.json create mode 100644 .butcher/types/WriteAccessAllowed/entity.json create mode 100644 CHANGES/1088.feature.rst create mode 100644 aiogram/methods/close_general_forum_topic.py create mode 100644 aiogram/methods/edit_general_forum_topic.py create mode 100644 aiogram/methods/hide_general_forum_topic.py create mode 100644 aiogram/methods/reopen_general_forum_topic.py create mode 100644 aiogram/methods/unhide_general_forum_topic.py create mode 100644 aiogram/types/forum_topic_edited.py create mode 100644 aiogram/types/general_forum_topic_hidden.py create mode 100644 aiogram/types/general_forum_topic_unhidden.py create mode 100644 aiogram/types/write_access_allowed.py create mode 100644 docs/api/methods/close_general_forum_topic.rst create mode 100644 docs/api/methods/edit_general_forum_topic.rst create mode 100644 docs/api/methods/hide_general_forum_topic.rst create mode 100644 docs/api/methods/reopen_general_forum_topic.rst create mode 100644 docs/api/methods/unhide_general_forum_topic.rst create mode 100644 docs/api/types/forum_topic_edited.rst create mode 100644 docs/api/types/general_forum_topic_hidden.rst create mode 100644 docs/api/types/general_forum_topic_unhidden.rst create mode 100644 docs/api/types/write_access_allowed.rst create mode 100644 tests/test_api/test_methods/test_close_general_forum_topic.py create mode 100644 tests/test_api/test_methods/test_edit_general_forum_topic.py create mode 100644 tests/test_api/test_methods/test_hide_general_forum_topic.py create mode 100644 tests/test_api/test_methods/test_reopen_general_forum_topic.py create mode 100644 tests/test_api/test_methods/test_unhide_general_forum_topic.py diff --git a/.apiversion b/.apiversion index 0faee7d9..c596943a 100644 --- a/.apiversion +++ b/.apiversion @@ -1 +1 @@ -6.3 +6.4 diff --git a/.butcher/methods/closeGeneralForumTopic/entity.json b/.butcher/methods/closeGeneralForumTopic/entity.json new file mode 100644 index 00000000..9fcbc4fe --- /dev/null +++ b/.butcher/methods/closeGeneralForumTopic/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "closegeneralforumtopic", + "name": "closeGeneralForumTopic", + "description": "Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.", + "html_description": "

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

", + "rst_description": "Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/editForumTopic/entity.json b/.butcher/methods/editForumTopic/entity.json index 8afac424..57bd3d5b 100644 --- a/.butcher/methods/editForumTopic/entity.json +++ b/.butcher/methods/editForumTopic/entity.json @@ -31,18 +31,18 @@ }, { "type": "String", - "required": true, - "description": "New topic name, 1-128 characters", - "html_description": "New topic name, 1-128 characters", - "rst_description": "New topic name, 1-128 characters\n", + "required": false, + "description": "New topic name, 0-128 characters. If not specififed or empty, the current name of the topic will be kept", + "html_description": "New topic name, 0-128 characters. If not specififed or empty, the current name of the topic will be kept", + "rst_description": "New topic name, 0-128 characters. If not specififed or empty, the current name of the topic will be kept\n", "name": "name" }, { "type": "String", - "required": true, - "description": "New unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers.", - "html_description": "New unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers.", - "rst_description": "New unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers.\n", + "required": false, + "description": "New unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified, the current icon will be kept", + "html_description": "New unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified, the current icon will be kept", + "rst_description": "New unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified, the current icon will be kept\n", "name": "icon_custom_emoji_id" } ], diff --git a/.butcher/methods/editGeneralForumTopic/entity.json b/.butcher/methods/editGeneralForumTopic/entity.json new file mode 100644 index 00000000..af18e846 --- /dev/null +++ b/.butcher/methods/editGeneralForumTopic/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "editgeneralforumtopic", + "name": "editGeneralForumTopic", + "description": "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights. Returns True on success.", + "html_description": "

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

", + "rst_description": "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have *can_manage_topics* administrator rights. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + }, + { + "type": "String", + "required": true, + "description": "New topic name, 1-128 characters", + "html_description": "New topic name, 1-128 characters", + "rst_description": "New topic name, 1-128 characters\n", + "name": "name" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getChatMember/entity.json b/.butcher/methods/getChatMember/entity.json index 4888f3b3..b33af127 100644 --- a/.butcher/methods/getChatMember/entity.json +++ b/.butcher/methods/getChatMember/entity.json @@ -9,9 +9,9 @@ "object": { "anchor": "getchatmember", "name": "getChatMember", - "description": "Use this method to get information about a member of a chat. Returns a ChatMember object on success.", - "html_description": "

Use this method to get information about a member of a chat. Returns a ChatMember object on success.

", - "rst_description": "Use this method to get information about a member of a chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success.", + "description": "Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the chat. Returns a ChatMember object on success.", + "html_description": "

Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the chat. Returns a ChatMember object on success.

", + "rst_description": "Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success.", "annotations": [ { "type": "Integer or String", diff --git a/.butcher/methods/hideGeneralForumTopic/entity.json b/.butcher/methods/hideGeneralForumTopic/entity.json new file mode 100644 index 00000000..f75c012a --- /dev/null +++ b/.butcher/methods/hideGeneralForumTopic/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "hidegeneralforumtopic", + "name": "hideGeneralForumTopic", + "description": "Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically closed if it was open. Returns True on success.", + "html_description": "

Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically closed if it was open. Returns True on success.

", + "rst_description": "Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. The topic will be automatically closed if it was open. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/reopenGeneralForumTopic/entity.json b/.butcher/methods/reopenGeneralForumTopic/entity.json new file mode 100644 index 00000000..c6efec74 --- /dev/null +++ b/.butcher/methods/reopenGeneralForumTopic/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "reopengeneralforumtopic", + "name": "reopenGeneralForumTopic", + "description": "Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically unhidden if it was hidden. Returns True on success.", + "html_description": "

Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically unhidden if it was hidden. Returns True on success.

", + "rst_description": "Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. The topic will be automatically unhidden if it was hidden. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendAnimation/entity.json b/.butcher/methods/sendAnimation/entity.json index aea0f674..92ebaa2d 100644 --- a/.butcher/methods/sendAnimation/entity.json +++ b/.butcher/methods/sendAnimation/entity.json @@ -93,6 +93,14 @@ "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", "name": "caption_entities" }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the animation needs to be covered with a spoiler animation", + "html_description": "Pass True if the animation needs to be covered with a spoiler animation", + "rst_description": "Pass :code:`True` if the animation needs to be covered with a spoiler animation\n", + "name": "has_spoiler" + }, { "type": "Boolean", "required": false, diff --git a/.butcher/methods/sendChatAction/entity.json b/.butcher/methods/sendChatAction/entity.json index ac43f7b8..cda25c18 100644 --- a/.butcher/methods/sendChatAction/entity.json +++ b/.butcher/methods/sendChatAction/entity.json @@ -21,6 +21,14 @@ "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", "name": "chat_id" }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread; supergroups only", + "html_description": "Unique identifier for the target message thread; supergroups only", + "rst_description": "Unique identifier for the target message thread; supergroups only\n", + "name": "message_thread_id" + }, { "type": "String", "required": true, diff --git a/.butcher/methods/sendPhoto/entity.json b/.butcher/methods/sendPhoto/entity.json index 05dea124..2cc2639f 100644 --- a/.butcher/methods/sendPhoto/entity.json +++ b/.butcher/methods/sendPhoto/entity.json @@ -61,6 +61,14 @@ "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", "name": "caption_entities" }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the photo needs to be covered with a spoiler animation", + "html_description": "Pass True if the photo needs to be covered with a spoiler animation", + "rst_description": "Pass :code:`True` if the photo needs to be covered with a spoiler animation\n", + "name": "has_spoiler" + }, { "type": "Boolean", "required": false, diff --git a/.butcher/methods/sendVideo/entity.json b/.butcher/methods/sendVideo/entity.json index 8f25a6d9..9343c43f 100644 --- a/.butcher/methods/sendVideo/entity.json +++ b/.butcher/methods/sendVideo/entity.json @@ -93,6 +93,14 @@ "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", "name": "caption_entities" }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the video needs to be covered with a spoiler animation", + "html_description": "Pass True if the video needs to be covered with a spoiler animation", + "rst_description": "Pass :code:`True` if the video needs to be covered with a spoiler animation\n", + "name": "has_spoiler" + }, { "type": "Boolean", "required": false, diff --git a/.butcher/methods/unhideGeneralForumTopic/entity.json b/.butcher/methods/unhideGeneralForumTopic/entity.json new file mode 100644 index 00000000..962e0473 --- /dev/null +++ b/.butcher/methods/unhideGeneralForumTopic/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "unhidegeneralforumtopic", + "name": "unhideGeneralForumTopic", + "description": "Use this method to unhide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.", + "html_description": "

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

", + "rst_description": "Use this method to unhide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/schema/schema.json b/.butcher/schema/schema.json index 5a184105..b79d08ae 100644 --- a/.butcher/schema/schema.json +++ b/.butcher/schema/schema.json @@ -1,7 +1,7 @@ { "api": { - "version": "6.3", - "release_date": "2022-11-05" + "version": "6.4", + "release_date": "2022-12-30" }, "items": [ { @@ -635,6 +635,22 @@ "name": "message_auto_delete_time", "required": false }, + { + "type": "True", + "description": "True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in getChat.", + "html_description": "Optional. True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in getChat.", + "rst_description": "*Optional*. :code:`True`, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "has_aggressive_anti_spam_enabled", + "required": false + }, + { + "type": "True", + "description": "True, if non-administrators can only get the list of bots and administrators in the chat. Returned only in getChat.", + "html_description": "Optional. True, if non-administrators can only get the list of bots and administrators in the chat. Returned only in getChat.", + "rst_description": "*Optional*. :code:`True`, if non-administrators can only get the list of bots and administrators in the chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "has_hidden_members", + "required": false + }, { "type": "True", "description": "True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.", @@ -941,6 +957,14 @@ "name": "caption_entities", "required": false }, + { + "type": "True", + "description": "True, if the message media is covered by a spoiler animation", + "html_description": "Optional. True, if the message media is covered by a spoiler animation", + "rst_description": "*Optional*. :code:`True`, if the message media is covered by a spoiler animation\n", + "name": "has_media_spoiler", + "required": false + }, { "type": "Contact", "description": "Message is a shared contact, information about the contact", @@ -1109,6 +1133,14 @@ "name": "connected_website", "required": false }, + { + "type": "WriteAccessAllowed", + "description": "Service message: the user allowed the bot added to the attachment menu to write messages", + "html_description": "Optional. Service message: the user allowed the bot added to the attachment menu to write messages", + "rst_description": "*Optional*. Service message: the user allowed the bot added to the attachment menu to write messages\n", + "name": "write_access_allowed", + "required": false + }, { "type": "PassportData", "description": "Telegram Passport data", @@ -1133,6 +1165,14 @@ "name": "forum_topic_created", "required": false }, + { + "type": "ForumTopicEdited", + "description": "Service message: forum topic edited", + "html_description": "Optional. Service message: forum topic edited", + "rst_description": "*Optional*. Service message: forum topic edited\n", + "name": "forum_topic_edited", + "required": false + }, { "type": "ForumTopicClosed", "description": "Service message: forum topic closed", @@ -1149,6 +1189,22 @@ "name": "forum_topic_reopened", "required": false }, + { + "type": "GeneralForumTopicHidden", + "description": "Service message: the 'General' forum topic hidden", + "html_description": "Optional. Service message: the 'General' forum topic hidden", + "rst_description": "*Optional*. Service message: the 'General' forum topic hidden\n", + "name": "general_forum_topic_hidden", + "required": false + }, + { + "type": "GeneralForumTopicUnhidden", + "description": "Service message: the 'General' forum topic unhidden", + "html_description": "Optional. Service message: the 'General' forum topic unhidden", + "rst_description": "*Optional*. Service message: the 'General' forum topic unhidden\n", + "name": "general_forum_topic_unhidden", + "required": false + }, { "type": "VideoChatScheduled", "description": "Service message: video chat scheduled", @@ -2241,6 +2297,32 @@ "annotations": [], "category": "types" }, + { + "anchor": "forumtopicedited", + "name": "ForumTopicEdited", + "description": "This object represents a service message about an edited forum topic.", + "html_description": "

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

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

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

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

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

", + "rst_description": "This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.", + "annotations": [], + "category": "types" + }, + { + "anchor": "writeaccessallowed", + "name": "WriteAccessAllowed", + "description": "This object represents a service message about a user allowing a bot added to the attachment menu to write messages. Currently holds no information.", + "html_description": "

This object represents a service message about a user allowing a bot added to the attachment menu to write messages. Currently holds no information.

", + "rst_description": "This object represents a service message about a user allowing a bot added to the attachment menu to write messages. Currently holds no information.", + "annotations": [], + "category": "types" + }, { "anchor": "videochatscheduled", "name": "VideoChatScheduled", @@ -2414,6 +2523,14 @@ "name": "keyboard", "required": true }, + { + "type": "Boolean", + "description": "Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to false, in which case the custom keyboard can be hidden and opened with a keyboard icon.", + "html_description": "Optional. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to false, in which case the custom keyboard can be hidden and opened with a keyboard icon.", + "rst_description": "*Optional*. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to *false*, in which case the custom keyboard can be hidden and opened with a keyboard icon.\n", + "name": "is_persistent", + "required": false + }, { "type": "Boolean", "description": "Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard.", @@ -4015,6 +4132,14 @@ "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", "name": "caption_entities", "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the photo needs to be covered with a spoiler animation", + "html_description": "Optional. Pass True if the photo needs to be covered with a spoiler animation", + "rst_description": "*Optional*. Pass :code:`True` if the photo needs to be covered with a spoiler animation\n", + "name": "has_spoiler", + "required": false } ], "category": "types" @@ -4105,6 +4230,14 @@ "rst_description": "*Optional*. Pass :code:`True` if the uploaded video is suitable for streaming\n", "name": "supports_streaming", "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the video needs to be covered with a spoiler animation", + "html_description": "Optional. Pass True if the video needs to be covered with a spoiler animation", + "rst_description": "*Optional*. Pass :code:`True` if the video needs to be covered with a spoiler animation\n", + "name": "has_spoiler", + "required": false } ], "category": "types" @@ -4187,6 +4320,14 @@ "rst_description": "*Optional*. Animation duration in seconds\n", "name": "duration", "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the animation needs to be covered with a spoiler animation", + "html_description": "Optional. Pass True if the animation needs to be covered with a spoiler animation", + "rst_description": "*Optional*. Pass :code:`True` if the animation needs to be covered with a spoiler animation\n", + "name": "has_spoiler", + "required": false } ], "category": "types" @@ -4699,6 +4840,14 @@ "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", "name": "caption_entities" }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the photo needs to be covered with a spoiler animation", + "html_description": "Pass True if the photo needs to be covered with a spoiler animation", + "rst_description": "Pass :code:`True` if the photo needs to be covered with a spoiler animation\n", + "name": "has_spoiler" + }, { "type": "Boolean", "required": false, @@ -5073,6 +5222,14 @@ "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", "name": "caption_entities" }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the video needs to be covered with a spoiler animation", + "html_description": "Pass True if the video needs to be covered with a spoiler animation", + "rst_description": "Pass :code:`True` if the video needs to be covered with a spoiler animation\n", + "name": "has_spoiler" + }, { "type": "Boolean", "required": false, @@ -5211,6 +5368,14 @@ "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", "name": "caption_entities" }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the animation needs to be covered with a spoiler animation", + "html_description": "Pass True if the animation needs to be covered with a spoiler animation", + "rst_description": "Pass :code:`True` if the animation needs to be covered with a spoiler animation\n", + "name": "has_spoiler" + }, { "type": "Boolean", "required": false, @@ -6241,6 +6406,14 @@ "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", "name": "chat_id" }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread; supergroups only", + "html_description": "Unique identifier for the target message thread; supergroups only", + "rst_description": "Unique identifier for the target message thread; supergroups only\n", + "name": "message_thread_id" + }, { "type": "String", "required": true, @@ -7109,9 +7282,9 @@ { "anchor": "getchatmember", "name": "getChatMember", - "description": "Use this method to get information about a member of a chat. Returns a ChatMember object on success.", - "html_description": "

Use this method to get information about a member of a chat. Returns a ChatMember object on success.

", - "rst_description": "Use this method to get information about a member of a chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success.", + "description": "Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the chat. Returns a ChatMember object on success.", + "html_description": "

Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the chat. Returns a ChatMember object on success.

", + "rst_description": "Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success.", "annotations": [ { "type": "Integer or String", @@ -7252,18 +7425,18 @@ }, { "type": "String", - "required": true, - "description": "New topic name, 1-128 characters", - "html_description": "New topic name, 1-128 characters", - "rst_description": "New topic name, 1-128 characters\n", + "required": false, + "description": "New topic name, 0-128 characters. If not specififed or empty, the current name of the topic will be kept", + "html_description": "New topic name, 0-128 characters. If not specififed or empty, the current name of the topic will be kept", + "rst_description": "New topic name, 0-128 characters. If not specififed or empty, the current name of the topic will be kept\n", "name": "name" }, { "type": "String", - "required": true, - "description": "New unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers.", - "html_description": "New unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers.", - "rst_description": "New unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers.\n", + "required": false, + "description": "New unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified, the current icon will be kept", + "html_description": "New unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified, the current icon will be kept", + "rst_description": "New unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified, the current icon will be kept\n", "name": "icon_custom_emoji_id" } ], @@ -7373,6 +7546,104 @@ ], "category": "methods" }, + { + "anchor": "editgeneralforumtopic", + "name": "editGeneralForumTopic", + "description": "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights. Returns True on success.", + "html_description": "

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

", + "rst_description": "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have *can_manage_topics* administrator rights. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + }, + { + "type": "String", + "required": true, + "description": "New topic name, 1-128 characters", + "html_description": "New topic name, 1-128 characters", + "rst_description": "New topic name, 1-128 characters\n", + "name": "name" + } + ], + "category": "methods" + }, + { + "anchor": "closegeneralforumtopic", + "name": "closeGeneralForumTopic", + "description": "Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.", + "html_description": "

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

", + "rst_description": "Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + } + ], + "category": "methods" + }, + { + "anchor": "reopengeneralforumtopic", + "name": "reopenGeneralForumTopic", + "description": "Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically unhidden if it was hidden. Returns True on success.", + "html_description": "

Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically unhidden if it was hidden. Returns True on success.

", + "rst_description": "Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. The topic will be automatically unhidden if it was hidden. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + } + ], + "category": "methods" + }, + { + "anchor": "hidegeneralforumtopic", + "name": "hideGeneralForumTopic", + "description": "Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically closed if it was open. Returns True on success.", + "html_description": "

Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically closed if it was open. Returns True on success.

", + "rst_description": "Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. The topic will be automatically closed if it was open. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + } + ], + "category": "methods" + }, + { + "anchor": "unhidegeneralforumtopic", + "name": "unhideGeneralForumTopic", + "description": "Use this method to unhide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.", + "html_description": "

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

", + "rst_description": "Use this method to unhide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + } + ], + "category": "methods" + }, { "anchor": "answercallbackquery", "name": "answerCallbackQuery", diff --git a/.butcher/types/Chat/entity.json b/.butcher/types/Chat/entity.json index 49660a75..5ba08c1d 100644 --- a/.butcher/types/Chat/entity.json +++ b/.butcher/types/Chat/entity.json @@ -181,6 +181,22 @@ "name": "message_auto_delete_time", "required": false }, + { + "type": "True", + "description": "True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in getChat.", + "html_description": "Optional. True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in getChat.", + "rst_description": "*Optional*. :code:`True`, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "has_aggressive_anti_spam_enabled", + "required": false + }, + { + "type": "True", + "description": "True, if non-administrators can only get the list of bots and administrators in the chat. Returned only in getChat.", + "html_description": "Optional. True, if non-administrators can only get the list of bots and administrators in the chat. Returned only in getChat.", + "rst_description": "*Optional*. :code:`True`, if non-administrators can only get the list of bots and administrators in the chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "has_hidden_members", + "required": false + }, { "type": "True", "description": "True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.", diff --git a/.butcher/types/ForumTopicEdited/entity.json b/.butcher/types/ForumTopicEdited/entity.json new file mode 100644 index 00000000..0adc5fdd --- /dev/null +++ b/.butcher/types/ForumTopicEdited/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "forumtopicedited", + "name": "ForumTopicEdited", + "description": "This object represents a service message about an edited forum topic.", + "html_description": "

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

", + "rst_description": "This object represents a service message about an edited forum topic.", + "annotations": [ + { + "type": "String", + "description": "New name of the topic, if it was edited", + "html_description": "Optional. New name of the topic, if it was edited", + "rst_description": "*Optional*. New name of the topic, if it was edited\n", + "name": "name", + "required": false + }, + { + "type": "String", + "description": "New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed", + "html_description": "Optional. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed", + "rst_description": "*Optional*. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed\n", + "name": "icon_custom_emoji_id", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/GeneralForumTopicHidden/entity.json b/.butcher/types/GeneralForumTopicHidden/entity.json new file mode 100644 index 00000000..de94d519 --- /dev/null +++ b/.butcher/types/GeneralForumTopicHidden/entity.json @@ -0,0 +1,18 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "generalforumtopichidden", + "name": "GeneralForumTopicHidden", + "description": "This object represents a service message about General forum topic hidden in the chat. Currently holds no information.", + "html_description": "

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

", + "rst_description": "This object represents a service message about General forum topic hidden in the chat. Currently holds no information.", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/GeneralForumTopicUnhidden/entity.json b/.butcher/types/GeneralForumTopicUnhidden/entity.json new file mode 100644 index 00000000..4c3d2287 --- /dev/null +++ b/.butcher/types/GeneralForumTopicUnhidden/entity.json @@ -0,0 +1,18 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "generalforumtopicunhidden", + "name": "GeneralForumTopicUnhidden", + "description": "This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.", + "html_description": "

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

", + "rst_description": "This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/InputMediaAnimation/entity.json b/.butcher/types/InputMediaAnimation/entity.json index a106d803..80dd5629 100644 --- a/.butcher/types/InputMediaAnimation/entity.json +++ b/.butcher/types/InputMediaAnimation/entity.json @@ -84,6 +84,14 @@ "rst_description": "*Optional*. Animation duration in seconds\n", "name": "duration", "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the animation needs to be covered with a spoiler animation", + "html_description": "Optional. Pass True if the animation needs to be covered with a spoiler animation", + "rst_description": "*Optional*. Pass :code:`True` if the animation needs to be covered with a spoiler animation\n", + "name": "has_spoiler", + "required": false } ], "category": "types" diff --git a/.butcher/types/InputMediaPhoto/entity.json b/.butcher/types/InputMediaPhoto/entity.json index 792f2cd1..091db974 100644 --- a/.butcher/types/InputMediaPhoto/entity.json +++ b/.butcher/types/InputMediaPhoto/entity.json @@ -52,6 +52,14 @@ "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", "name": "caption_entities", "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the photo needs to be covered with a spoiler animation", + "html_description": "Optional. Pass True if the photo needs to be covered with a spoiler animation", + "rst_description": "*Optional*. Pass :code:`True` if the photo needs to be covered with a spoiler animation\n", + "name": "has_spoiler", + "required": false } ], "category": "types" diff --git a/.butcher/types/InputMediaVideo/entity.json b/.butcher/types/InputMediaVideo/entity.json index 2f200b46..97ceb6b7 100644 --- a/.butcher/types/InputMediaVideo/entity.json +++ b/.butcher/types/InputMediaVideo/entity.json @@ -92,6 +92,14 @@ "rst_description": "*Optional*. Pass :code:`True` if the uploaded video is suitable for streaming\n", "name": "supports_streaming", "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the video needs to be covered with a spoiler animation", + "html_description": "Optional. Pass True if the video needs to be covered with a spoiler animation", + "rst_description": "*Optional*. Pass :code:`True` if the video needs to be covered with a spoiler animation\n", + "name": "has_spoiler", + "required": false } ], "category": "types" diff --git a/.butcher/types/Message/entity.json b/.butcher/types/Message/entity.json index 8ebf773a..4613ecb7 100644 --- a/.butcher/types/Message/entity.json +++ b/.butcher/types/Message/entity.json @@ -269,6 +269,14 @@ "name": "caption_entities", "required": false }, + { + "type": "True", + "description": "True, if the message media is covered by a spoiler animation", + "html_description": "Optional. True, if the message media is covered by a spoiler animation", + "rst_description": "*Optional*. :code:`True`, if the message media is covered by a spoiler animation\n", + "name": "has_media_spoiler", + "required": false + }, { "type": "Contact", "description": "Message is a shared contact, information about the contact", @@ -437,6 +445,14 @@ "name": "connected_website", "required": false }, + { + "type": "WriteAccessAllowed", + "description": "Service message: the user allowed the bot added to the attachment menu to write messages", + "html_description": "Optional. Service message: the user allowed the bot added to the attachment menu to write messages", + "rst_description": "*Optional*. Service message: the user allowed the bot added to the attachment menu to write messages\n", + "name": "write_access_allowed", + "required": false + }, { "type": "PassportData", "description": "Telegram Passport data", @@ -461,6 +477,14 @@ "name": "forum_topic_created", "required": false }, + { + "type": "ForumTopicEdited", + "description": "Service message: forum topic edited", + "html_description": "Optional. Service message: forum topic edited", + "rst_description": "*Optional*. Service message: forum topic edited\n", + "name": "forum_topic_edited", + "required": false + }, { "type": "ForumTopicClosed", "description": "Service message: forum topic closed", @@ -477,6 +501,22 @@ "name": "forum_topic_reopened", "required": false }, + { + "type": "GeneralForumTopicHidden", + "description": "Service message: the 'General' forum topic hidden", + "html_description": "Optional. Service message: the 'General' forum topic hidden", + "rst_description": "*Optional*. Service message: the 'General' forum topic hidden\n", + "name": "general_forum_topic_hidden", + "required": false + }, + { + "type": "GeneralForumTopicUnhidden", + "description": "Service message: the 'General' forum topic unhidden", + "html_description": "Optional. Service message: the 'General' forum topic unhidden", + "rst_description": "*Optional*. Service message: the 'General' forum topic unhidden\n", + "name": "general_forum_topic_unhidden", + "required": false + }, { "type": "VideoChatScheduled", "description": "Service message: video chat scheduled", diff --git a/.butcher/types/ReplyKeyboardMarkup/entity.json b/.butcher/types/ReplyKeyboardMarkup/entity.json index 1ae025ff..586bf507 100644 --- a/.butcher/types/ReplyKeyboardMarkup/entity.json +++ b/.butcher/types/ReplyKeyboardMarkup/entity.json @@ -21,6 +21,14 @@ "name": "keyboard", "required": true }, + { + "type": "Boolean", + "description": "Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to false, in which case the custom keyboard can be hidden and opened with a keyboard icon.", + "html_description": "Optional. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to false, in which case the custom keyboard can be hidden and opened with a keyboard icon.", + "rst_description": "*Optional*. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to *false*, in which case the custom keyboard can be hidden and opened with a keyboard icon.\n", + "name": "is_persistent", + "required": false + }, { "type": "Boolean", "description": "Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard.", diff --git a/.butcher/types/WriteAccessAllowed/entity.json b/.butcher/types/WriteAccessAllowed/entity.json new file mode 100644 index 00000000..f9a0d1ed --- /dev/null +++ b/.butcher/types/WriteAccessAllowed/entity.json @@ -0,0 +1,18 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "writeaccessallowed", + "name": "WriteAccessAllowed", + "description": "This object represents a service message about a user allowing a bot added to the attachment menu to write messages. Currently holds no information.", + "html_description": "

This object represents a service message about a user allowing a bot added to the attachment menu to write messages. Currently holds no information.

", + "rst_description": "This object represents a service message about a user allowing a bot added to the attachment menu to write messages. Currently holds no information.", + "annotations": [], + "category": "types" + } +} diff --git a/CHANGES/1088.feature.rst b/CHANGES/1088.feature.rst new file mode 100644 index 00000000..2671fbed --- /dev/null +++ b/CHANGES/1088.feature.rst @@ -0,0 +1 @@ +Added full support of `Bot API 6.4 `_ diff --git a/README.rst b/README.rst index dce1339f..a5257566 100644 --- a/README.rst +++ b/README.rst @@ -13,7 +13,7 @@ aiogram |beta badge| :target: https://pypi.python.org/pypi/aiogram :alt: Supported python versions -.. image:: https://img.shields.io/badge/Telegram%20Bot%20API-6.3-blue.svg?logo=telegram +.. image:: https://img.shields.io/badge/Telegram%20Bot%20API-6.4-blue.svg?logo=telegram :target: https://core.telegram.org/bots/api :alt: Telegram Bot API @@ -67,7 +67,7 @@ Features - Asynchronous (`asyncio docs `_, :pep:`492`) - Has type hints (:pep:`484`) and can be used with `mypy `_ - Supports `PyPy `_ -- Supports `Telegram Bot API 6.3 `_ and gets fast updates to the latest versions of the Bot API +- Supports `Telegram Bot API 6.4 `_ and gets fast updates to the latest versions of the Bot API - Telegram Bot API integration code was `autogenerated `_ and can be easily re-generated when API gets updated - Updates router (Blueprints) - Has Finite State Machine diff --git a/aiogram/__init__.py b/aiogram/__init__.py index b74395a8..42fb50f4 100644 --- a/aiogram/__init__.py +++ b/aiogram/__init__.py @@ -36,4 +36,4 @@ __all__ = ( ) __version__ = "3.0.0b7" -__api_version__ = "6.3" +__api_version__ = "6.4" diff --git a/aiogram/client/bot.py b/aiogram/client/bot.py index ca06a62d..f293da9f 100644 --- a/aiogram/client/bot.py +++ b/aiogram/client/bot.py @@ -33,6 +33,7 @@ from ..methods import ( BanChatSenderChat, Close, CloseForumTopic, + CloseGeneralForumTopic, CopyMessage, CreateChatInviteLink, CreateForumTopic, @@ -48,6 +49,7 @@ from ..methods import ( DeleteWebhook, EditChatInviteLink, EditForumTopic, + EditGeneralForumTopic, EditMessageCaption, EditMessageLiveLocation, EditMessageMedia, @@ -71,11 +73,13 @@ from ..methods import ( GetUpdates, GetUserProfilePhotos, GetWebhookInfo, + HideGeneralForumTopic, LeaveChat, LogOut, PinChatMessage, PromoteChatMember, ReopenForumTopic, + ReopenGeneralForumTopic, RestrictChatMember, RevokeChatInviteLink, SendAnimation, @@ -115,6 +119,7 @@ from ..methods import ( TelegramMethod, UnbanChatMember, UnbanChatSenderChat, + UnhideGeneralForumTopic, UnpinAllChatMessages, UnpinAllForumTopicMessages, UnpinChatMessage, @@ -1103,8 +1108,8 @@ class Bot(ContextInstanceMixin["Bot"]): self, chat_id: Union[int, str], message_thread_id: int, - name: str, - icon_custom_emoji_id: str, + name: Optional[str] = None, + icon_custom_emoji_id: Optional[str] = None, request_timeout: Optional[int] = None, ) -> bool: """ @@ -1112,8 +1117,8 @@ class Bot(ContextInstanceMixin["Bot"]): :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) :param message_thread_id: Unique identifier for the target message thread of the forum topic - :param name: New topic name, 1-128 characters - :param icon_custom_emoji_id: New unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers. + :param name: New topic name, 0-128 characters. If not specififed or empty, the current name of the topic will be kept + :param icon_custom_emoji_id: New unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified, the current icon will be kept :param request_timeout: Request timeout :return: Returns :code:`True` on success. """ @@ -1412,7 +1417,7 @@ class Bot(ContextInstanceMixin["Bot"]): ChatMemberBanned, ]: """ - Use this method to get information about a member of a chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. + Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`) :param user_id: Unique identifier of the target user @@ -1878,6 +1883,7 @@ class Bot(ContextInstanceMixin["Bot"]): caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, + has_spoiler: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, reply_to_message_id: Optional[int] = None, @@ -1900,6 +1906,7 @@ class Bot(ContextInstanceMixin["Bot"]): :param caption: Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the animation caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* + :param has_spoiler: Pass :code:`True` if the animation needs to be covered with a spoiler animation :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_to_message_id: If the message is a reply, ID of the original message @@ -1920,6 +1927,7 @@ class Bot(ContextInstanceMixin["Bot"]): caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, + has_spoiler=has_spoiler, disable_notification=disable_notification, protect_content=protect_content, reply_to_message_id=reply_to_message_id, @@ -1995,6 +2003,7 @@ class Bot(ContextInstanceMixin["Bot"]): self, chat_id: Union[int, str], action: str, + message_thread_id: Optional[int] = None, request_timeout: Optional[int] = None, ) -> bool: """ @@ -2006,6 +2015,7 @@ class Bot(ContextInstanceMixin["Bot"]): :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param action: Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for `text messages `_, *upload_photo* for `photos `_, *record_video* or *upload_video* for `videos `_, *record_voice* or *upload_voice* for `voice notes `_, *upload_document* for `general files `_, *choose_sticker* for `stickers `_, *find_location* for `location data `_, *record_video_note* or *upload_video_note* for `video notes `_. + :param message_thread_id: Unique identifier for the target message thread; supergroups only :param request_timeout: Request timeout :return: The user will see a 'sending photo' status for the bot. """ @@ -2013,6 +2023,7 @@ class Bot(ContextInstanceMixin["Bot"]): call = SendChatAction( chat_id=chat_id, action=action, + message_thread_id=message_thread_id, ) return await self(call, request_timeout=request_timeout) @@ -2451,6 +2462,7 @@ class Bot(ContextInstanceMixin["Bot"]): caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, + has_spoiler: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, reply_to_message_id: Optional[int] = None, @@ -2469,6 +2481,7 @@ class Bot(ContextInstanceMixin["Bot"]): :param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the photo caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* + :param has_spoiler: Pass :code:`True` if the photo needs to be covered with a spoiler animation :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_to_message_id: If the message is a reply, ID of the original message @@ -2485,6 +2498,7 @@ class Bot(ContextInstanceMixin["Bot"]): caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, + has_spoiler=has_spoiler, disable_notification=disable_notification, protect_content=protect_content, reply_to_message_id=reply_to_message_id, @@ -2682,6 +2696,7 @@ class Bot(ContextInstanceMixin["Bot"]): caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, + has_spoiler: Optional[bool] = None, supports_streaming: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, @@ -2705,6 +2720,7 @@ class Bot(ContextInstanceMixin["Bot"]): :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the video caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* + :param has_spoiler: Pass :code:`True` if the video needs to be covered with a spoiler animation :param supports_streaming: Pass :code:`True` if the uploaded video is suitable for streaming :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving @@ -2726,6 +2742,7 @@ class Bot(ContextInstanceMixin["Bot"]): caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, + has_spoiler=has_spoiler, supports_streaming=supports_streaming, disable_notification=disable_notification, protect_content=protect_content, @@ -3360,3 +3377,96 @@ class Bot(ContextInstanceMixin["Bot"]): png_sticker=png_sticker, ) return await self(call, request_timeout=request_timeout) + + async def close_general_forum_topic( + self, + chat_id: Union[int, str], + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = CloseGeneralForumTopic( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def edit_general_forum_topic( + self, + chat_id: Union[int, str], + name: str, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have *can_manage_topics* administrator rights. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param name: New topic name, 1-128 characters + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = EditGeneralForumTopic( + chat_id=chat_id, + name=name, + ) + return await self(call, request_timeout=request_timeout) + + async def hide_general_forum_topic( + self, + chat_id: Union[int, str], + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. The topic will be automatically closed if it was open. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = HideGeneralForumTopic( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def reopen_general_forum_topic( + self, + chat_id: Union[int, str], + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. The topic will be automatically unhidden if it was hidden. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = ReopenGeneralForumTopic( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def unhide_general_forum_topic( + self, + chat_id: Union[int, str], + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to unhide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = UnhideGeneralForumTopic( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) diff --git a/aiogram/enums/content_type.py b/aiogram/enums/content_type.py index 18fa3484..854fda85 100644 --- a/aiogram/enums/content_type.py +++ b/aiogram/enums/content_type.py @@ -17,6 +17,7 @@ class ContentType(str, Enum): VIDEO = "video" VIDEO_NOTE = "video_note" VOICE = "voice" + HAS_MEDIA_SPOILER = "has_media_spoiler" CONTACT = "contact" DICE = "dice" GAME = "game" @@ -38,11 +39,15 @@ class ContentType(str, Enum): INVOICE = "invoice" SUCCESSFUL_PAYMENT = "successful_payment" CONNECTED_WEBSITE = "connected_website" + WRITE_ACCESS_ALLOWED = "write_access_allowed" PASSPORT_DATA = "passport_data" PROXIMITY_ALERT_TRIGGERED = "proximity_alert_triggered" FORUM_TOPIC_CREATED = "forum_topic_created" + FORUM_TOPIC_EDITED = "forum_topic_edited" FORUM_TOPIC_CLOSED = "forum_topic_closed" FORUM_TOPIC_REOPENED = "forum_topic_reopened" + GENERAL_FORUM_TOPIC_HIDDEN = "general_forum_topic_hidden" + GENERAL_FORUM_TOPIC_UNHIDDEN = "general_forum_topic_unhidden" VIDEO_CHAT_SCHEDULED = "video_chat_scheduled" VIDEO_CHAT_STARTED = "video_chat_started" VIDEO_CHAT_ENDED = "video_chat_ended" diff --git a/aiogram/methods/__init__.py b/aiogram/methods/__init__.py index fdabfe8b..d50e99a0 100644 --- a/aiogram/methods/__init__.py +++ b/aiogram/methods/__init__.py @@ -10,6 +10,7 @@ from .ban_chat_sender_chat import BanChatSenderChat from .base import Request, Response, TelegramMethod from .close import Close from .close_forum_topic import CloseForumTopic +from .close_general_forum_topic import CloseGeneralForumTopic from .copy_message import CopyMessage from .create_chat_invite_link import CreateChatInviteLink from .create_forum_topic import CreateForumTopic @@ -25,6 +26,7 @@ from .delete_sticker_from_set import DeleteStickerFromSet from .delete_webhook import DeleteWebhook from .edit_chat_invite_link import EditChatInviteLink from .edit_forum_topic import EditForumTopic +from .edit_general_forum_topic import EditGeneralForumTopic from .edit_message_caption import EditMessageCaption from .edit_message_live_location import EditMessageLiveLocation from .edit_message_media import EditMessageMedia @@ -48,11 +50,13 @@ from .get_sticker_set import GetStickerSet from .get_updates import GetUpdates from .get_user_profile_photos import GetUserProfilePhotos from .get_webhook_info import GetWebhookInfo +from .hide_general_forum_topic import HideGeneralForumTopic from .leave_chat import LeaveChat from .log_out import LogOut from .pin_chat_message import PinChatMessage from .promote_chat_member import PromoteChatMember from .reopen_forum_topic import ReopenForumTopic +from .reopen_general_forum_topic import ReopenGeneralForumTopic from .restrict_chat_member import RestrictChatMember from .revoke_chat_invite_link import RevokeChatInviteLink from .send_animation import SendAnimation @@ -91,109 +95,115 @@ from .stop_message_live_location import StopMessageLiveLocation from .stop_poll import StopPoll from .unban_chat_member import UnbanChatMember from .unban_chat_sender_chat import UnbanChatSenderChat +from .unhide_general_forum_topic import UnhideGeneralForumTopic from .unpin_all_chat_messages import UnpinAllChatMessages from .unpin_all_forum_topic_messages import UnpinAllForumTopicMessages from .unpin_chat_message import UnpinChatMessage from .upload_sticker_file import UploadStickerFile __all__ = ( - "TelegramMethod", - "Request", - "Response", - "GetUpdates", - "SetWebhook", - "DeleteWebhook", - "GetWebhookInfo", - "GetMe", - "LogOut", - "Close", - "SendMessage", - "ForwardMessage", - "CopyMessage", - "SendPhoto", - "SendAudio", - "SendDocument", - "SendVideo", - "SendAnimation", - "SendVoice", - "SendVideoNote", - "SendMediaGroup", - "SendLocation", - "EditMessageLiveLocation", - "StopMessageLiveLocation", - "SendVenue", - "SendContact", - "SendPoll", - "SendDice", - "SendChatAction", - "GetUserProfilePhotos", - "GetFile", - "BanChatMember", - "UnbanChatMember", - "RestrictChatMember", - "PromoteChatMember", - "SetChatAdministratorCustomTitle", - "BanChatSenderChat", - "UnbanChatSenderChat", - "SetChatPermissions", - "ExportChatInviteLink", - "CreateChatInviteLink", - "EditChatInviteLink", - "RevokeChatInviteLink", - "ApproveChatJoinRequest", - "DeclineChatJoinRequest", - "SetChatPhoto", - "DeleteChatPhoto", - "SetChatTitle", - "SetChatDescription", - "PinChatMessage", - "UnpinChatMessage", - "UnpinAllChatMessages", - "LeaveChat", - "GetChat", - "GetChatAdministrators", - "GetChatMemberCount", - "GetChatMember", - "SetChatStickerSet", - "DeleteChatStickerSet", - "GetForumTopicIconStickers", - "CreateForumTopic", - "EditForumTopic", - "CloseForumTopic", - "ReopenForumTopic", - "DeleteForumTopic", - "UnpinAllForumTopicMessages", + "AddStickerToSet", "AnswerCallbackQuery", - "SetMyCommands", + "AnswerInlineQuery", + "AnswerPreCheckoutQuery", + "AnswerShippingQuery", + "AnswerWebAppQuery", + "ApproveChatJoinRequest", + "BanChatMember", + "BanChatSenderChat", + "Close", + "CloseForumTopic", + "CloseGeneralForumTopic", + "CopyMessage", + "CreateChatInviteLink", + "CreateForumTopic", + "CreateInvoiceLink", + "CreateNewStickerSet", + "DeclineChatJoinRequest", + "DeleteChatPhoto", + "DeleteChatStickerSet", + "DeleteForumTopic", + "DeleteMessage", "DeleteMyCommands", - "GetMyCommands", - "SetChatMenuButton", - "GetChatMenuButton", - "SetMyDefaultAdministratorRights", - "GetMyDefaultAdministratorRights", - "EditMessageText", + "DeleteStickerFromSet", + "DeleteWebhook", + "EditChatInviteLink", + "EditForumTopic", + "EditGeneralForumTopic", "EditMessageCaption", + "EditMessageLiveLocation", "EditMessageMedia", "EditMessageReplyMarkup", - "StopPoll", - "DeleteMessage", - "SendSticker", - "GetStickerSet", + "EditMessageText", + "ExportChatInviteLink", + "ForwardMessage", + "GetChat", + "GetChatAdministrators", + "GetChatMember", + "GetChatMemberCount", + "GetChatMenuButton", "GetCustomEmojiStickers", - "UploadStickerFile", - "CreateNewStickerSet", - "AddStickerToSet", - "SetStickerPositionInSet", - "DeleteStickerFromSet", - "SetStickerSetThumb", - "AnswerInlineQuery", - "AnswerWebAppQuery", - "SendInvoice", - "CreateInvoiceLink", - "AnswerShippingQuery", - "AnswerPreCheckoutQuery", - "SetPassportDataErrors", - "SendGame", - "SetGameScore", + "GetFile", + "GetForumTopicIconStickers", "GetGameHighScores", + "GetMe", + "GetMyCommands", + "GetMyDefaultAdministratorRights", + "GetStickerSet", + "GetUpdates", + "GetUserProfilePhotos", + "GetWebhookInfo", + "HideGeneralForumTopic", + "LeaveChat", + "LogOut", + "PinChatMessage", + "PromoteChatMember", + "ReopenForumTopic", + "ReopenGeneralForumTopic", + "Request", + "Response", + "RestrictChatMember", + "RevokeChatInviteLink", + "SendAnimation", + "SendAudio", + "SendChatAction", + "SendContact", + "SendDice", + "SendDocument", + "SendGame", + "SendInvoice", + "SendLocation", + "SendMediaGroup", + "SendMessage", + "SendPhoto", + "SendPoll", + "SendSticker", + "SendVenue", + "SendVideo", + "SendVideoNote", + "SendVoice", + "SetChatAdministratorCustomTitle", + "SetChatDescription", + "SetChatMenuButton", + "SetChatPermissions", + "SetChatPhoto", + "SetChatStickerSet", + "SetChatTitle", + "SetGameScore", + "SetMyCommands", + "SetMyDefaultAdministratorRights", + "SetPassportDataErrors", + "SetStickerPositionInSet", + "SetStickerSetThumb", + "SetWebhook", + "StopMessageLiveLocation", + "StopPoll", + "TelegramMethod", + "UnbanChatMember", + "UnbanChatSenderChat", + "UnhideGeneralForumTopic", + "UnpinAllChatMessages", + "UnpinAllForumTopicMessages", + "UnpinChatMessage", + "UploadStickerFile", ) diff --git a/aiogram/methods/close_general_forum_topic.py b/aiogram/methods/close_general_forum_topic.py new file mode 100644 index 00000000..1dea28c4 --- /dev/null +++ b/aiogram/methods/close_general_forum_topic.py @@ -0,0 +1,26 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Dict, Union + +from .base import Request, TelegramMethod + +if TYPE_CHECKING: + from ..client.bot import Bot + + +class CloseGeneralForumTopic(TelegramMethod[bool]): + """ + Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#closegeneralforumtopic + """ + + __returning__ = bool + + chat_id: Union[int, str] + """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" + + def build_request(self, bot: Bot) -> Request: + data: Dict[str, Any] = self.dict() + + return Request(method="closeGeneralForumTopic", data=data) diff --git a/aiogram/methods/edit_forum_topic.py b/aiogram/methods/edit_forum_topic.py index ed2f55dd..64a78558 100644 --- a/aiogram/methods/edit_forum_topic.py +++ b/aiogram/methods/edit_forum_topic.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Any, Dict, Optional, Union from .base import Request, TelegramMethod @@ -21,10 +21,10 @@ class EditForumTopic(TelegramMethod[bool]): """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" message_thread_id: int """Unique identifier for the target message thread of the forum topic""" - name: str - """New topic name, 1-128 characters""" - icon_custom_emoji_id: str - """New unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers.""" + name: Optional[str] = None + """New topic name, 0-128 characters. If not specififed or empty, the current name of the topic will be kept""" + icon_custom_emoji_id: Optional[str] = None + """New unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified, the current icon will be kept""" def build_request(self, bot: Bot) -> Request: data: Dict[str, Any] = self.dict() diff --git a/aiogram/methods/edit_general_forum_topic.py b/aiogram/methods/edit_general_forum_topic.py new file mode 100644 index 00000000..532e05b7 --- /dev/null +++ b/aiogram/methods/edit_general_forum_topic.py @@ -0,0 +1,28 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Dict, Union + +from .base import Request, TelegramMethod + +if TYPE_CHECKING: + from ..client.bot import Bot + + +class EditGeneralForumTopic(TelegramMethod[bool]): + """ + Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have *can_manage_topics* administrator rights. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#editgeneralforumtopic + """ + + __returning__ = bool + + chat_id: Union[int, str] + """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" + name: str + """New topic name, 1-128 characters""" + + def build_request(self, bot: Bot) -> Request: + data: Dict[str, Any] = self.dict() + + return Request(method="editGeneralForumTopic", data=data) diff --git a/aiogram/methods/get_chat_member.py b/aiogram/methods/get_chat_member.py index faf5dece..29d264ab 100644 --- a/aiogram/methods/get_chat_member.py +++ b/aiogram/methods/get_chat_member.py @@ -29,7 +29,7 @@ class GetChatMember( ] ): """ - Use this method to get information about a member of a chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. + Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. Source: https://core.telegram.org/bots/api#getchatmember """ diff --git a/aiogram/methods/hide_general_forum_topic.py b/aiogram/methods/hide_general_forum_topic.py new file mode 100644 index 00000000..6e20a6bd --- /dev/null +++ b/aiogram/methods/hide_general_forum_topic.py @@ -0,0 +1,26 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Dict, Union + +from .base import Request, TelegramMethod + +if TYPE_CHECKING: + from ..client.bot import Bot + + +class HideGeneralForumTopic(TelegramMethod[bool]): + """ + Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. The topic will be automatically closed if it was open. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#hidegeneralforumtopic + """ + + __returning__ = bool + + chat_id: Union[int, str] + """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" + + def build_request(self, bot: Bot) -> Request: + data: Dict[str, Any] = self.dict() + + return Request(method="hideGeneralForumTopic", data=data) diff --git a/aiogram/methods/reopen_general_forum_topic.py b/aiogram/methods/reopen_general_forum_topic.py new file mode 100644 index 00000000..1d27ca2d --- /dev/null +++ b/aiogram/methods/reopen_general_forum_topic.py @@ -0,0 +1,26 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Dict, Union + +from .base import Request, TelegramMethod + +if TYPE_CHECKING: + from ..client.bot import Bot + + +class ReopenGeneralForumTopic(TelegramMethod[bool]): + """ + Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. The topic will be automatically unhidden if it was hidden. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#reopengeneralforumtopic + """ + + __returning__ = bool + + chat_id: Union[int, str] + """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" + + def build_request(self, bot: Bot) -> Request: + data: Dict[str, Any] = self.dict() + + return Request(method="reopenGeneralForumTopic", data=data) diff --git a/aiogram/methods/send_animation.py b/aiogram/methods/send_animation.py index 18533414..3bebdc78 100644 --- a/aiogram/methods/send_animation.py +++ b/aiogram/methods/send_animation.py @@ -47,6 +47,8 @@ class SendAnimation(TelegramMethod[Message]): """Mode for parsing entities in the animation caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" + has_spoiler: Optional[bool] = None + """Pass :code:`True` if the animation needs to be covered with a spoiler animation""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" protect_content: Optional[bool] = None diff --git a/aiogram/methods/send_chat_action.py b/aiogram/methods/send_chat_action.py index 9eb22413..538300b2 100644 --- a/aiogram/methods/send_chat_action.py +++ b/aiogram/methods/send_chat_action.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Any, Dict, Optional, Union from .base import Request, TelegramMethod @@ -25,6 +25,8 @@ class SendChatAction(TelegramMethod[bool]): """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" action: str """Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for `text messages `_, *upload_photo* for `photos `_, *record_video* or *upload_video* for `videos `_, *record_voice* or *upload_voice* for `voice notes `_, *upload_document* for `general files `_, *choose_sticker* for `stickers `_, *find_location* for `location data `_, *record_video_note* or *upload_video_note* for `video notes `_.""" + message_thread_id: Optional[int] = None + """Unique identifier for the target message thread; supergroups only""" def build_request(self, bot: Bot) -> Request: data: Dict[str, Any] = self.dict() diff --git a/aiogram/methods/send_photo.py b/aiogram/methods/send_photo.py index 0534c841..43a4c65a 100644 --- a/aiogram/methods/send_photo.py +++ b/aiogram/methods/send_photo.py @@ -39,6 +39,8 @@ class SendPhoto(TelegramMethod[Message]): """Mode for parsing entities in the photo caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" + has_spoiler: Optional[bool] = None + """Pass :code:`True` if the photo needs to be covered with a spoiler animation""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" protect_content: Optional[bool] = None diff --git a/aiogram/methods/send_video.py b/aiogram/methods/send_video.py index d30f5fed..b144d090 100644 --- a/aiogram/methods/send_video.py +++ b/aiogram/methods/send_video.py @@ -47,6 +47,8 @@ class SendVideo(TelegramMethod[Message]): """Mode for parsing entities in the video caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" + has_spoiler: Optional[bool] = None + """Pass :code:`True` if the video needs to be covered with a spoiler animation""" supports_streaming: Optional[bool] = None """Pass :code:`True` if the uploaded video is suitable for streaming""" disable_notification: Optional[bool] = None diff --git a/aiogram/methods/unhide_general_forum_topic.py b/aiogram/methods/unhide_general_forum_topic.py new file mode 100644 index 00000000..2ee341aa --- /dev/null +++ b/aiogram/methods/unhide_general_forum_topic.py @@ -0,0 +1,26 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Dict, Union + +from .base import Request, TelegramMethod + +if TYPE_CHECKING: + from ..client.bot import Bot + + +class UnhideGeneralForumTopic(TelegramMethod[bool]): + """ + Use this method to unhide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#unhidegeneralforumtopic + """ + + __returning__ = bool + + chat_id: Union[int, str] + """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" + + def build_request(self, bot: Bot) -> Request: + data: Dict[str, Any] = self.dict() + + return Request(method="unhideGeneralForumTopic", data=data) diff --git a/aiogram/types/__init__.py b/aiogram/types/__init__.py index 91d19870..b38ec2c3 100644 --- a/aiogram/types/__init__.py +++ b/aiogram/types/__init__.py @@ -42,9 +42,12 @@ from .force_reply import ForceReply from .forum_topic import ForumTopic from .forum_topic_closed import ForumTopicClosed from .forum_topic_created import ForumTopicCreated +from .forum_topic_edited import ForumTopicEdited from .forum_topic_reopened import ForumTopicReopened from .game import Game from .game_high_score import GameHighScore +from .general_forum_topic_hidden import GeneralForumTopicHidden +from .general_forum_topic_unhidden import GeneralForumTopicUnhidden from .inline_keyboard_button import InlineKeyboardButton from .inline_keyboard_markup import InlineKeyboardMarkup from .inline_query import InlineQuery @@ -140,6 +143,7 @@ from .voice import Voice from .web_app_data import WebAppData from .web_app_info import WebAppInfo from .webhook_info import WebhookInfo +from .write_access_allowed import WriteAccessAllowed __all__ = ( "Animation", @@ -186,9 +190,12 @@ __all__ = ( "ForumTopic", "ForumTopicClosed", "ForumTopicCreated", + "ForumTopicEdited", "ForumTopicReopened", "Game", "GameHighScore", + "GeneralForumTopicHidden", + "GeneralForumTopicUnhidden", "InlineKeyboardButton", "InlineKeyboardMarkup", "InlineQuery", @@ -287,6 +294,7 @@ __all__ = ( "WebAppData", "WebAppInfo", "WebhookInfo", + "WriteAccessAllowed", ) # Load typing forward refs for every TelegramObject diff --git a/aiogram/types/chat.py b/aiogram/types/chat.py index a5b08173..78e7c301 100644 --- a/aiogram/types/chat.py +++ b/aiogram/types/chat.py @@ -91,6 +91,10 @@ class Chat(TelegramObject): """*Optional*. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" message_auto_delete_time: Optional[int] = None """*Optional*. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" + has_aggressive_anti_spam_enabled: Optional[bool] = None + """*Optional*. :code:`True`, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" + has_hidden_members: Optional[bool] = None + """*Optional*. :code:`True`, if non-administrators can only get the list of bots and administrators in the chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" has_protected_content: Optional[bool] = None """*Optional*. :code:`True`, if messages from the chat can't be forwarded to other chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" sticker_set_name: Optional[str] = None @@ -403,6 +407,7 @@ class Chat(TelegramObject): def do( self, action: str, + message_thread_id: Optional[int] = None, **kwargs: Any, ) -> SendChatAction: """ @@ -420,6 +425,7 @@ class Chat(TelegramObject): Source: https://core.telegram.org/bots/api#sendchataction :param action: Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for `text messages `_, *upload_photo* for `photos `_, *record_video* or *upload_video* for `videos `_, *record_voice* or *upload_voice* for `voice notes `_, *upload_document* for `general files `_, *choose_sticker* for `stickers `_, *find_location* for `location data `_, *record_video_note* or *upload_video_note* for `video notes `_. + :param message_thread_id: Unique identifier for the target message thread; supergroups only :return: instance of method :class:`aiogram.methods.send_chat_action.SendChatAction` """ # DO NOT EDIT MANUALLY!!! @@ -430,6 +436,7 @@ class Chat(TelegramObject): return SendChatAction( chat_id=self.id, action=action, + message_thread_id=message_thread_id, **kwargs, ) @@ -499,7 +506,7 @@ class Chat(TelegramObject): - :code:`chat_id` - Use this method to get information about a member of a chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. + Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. Source: https://core.telegram.org/bots/api#getchatmember diff --git a/aiogram/types/forum_topic_edited.py b/aiogram/types/forum_topic_edited.py new file mode 100644 index 00000000..52b4f893 --- /dev/null +++ b/aiogram/types/forum_topic_edited.py @@ -0,0 +1,16 @@ +from typing import Optional + +from aiogram.types import TelegramObject + + +class ForumTopicEdited(TelegramObject): + """ + This object represents a service message about an edited forum topic. + + Source: https://core.telegram.org/bots/api#forumtopicedited + """ + + name: Optional[str] = None + """*Optional*. New name of the topic, if it was edited""" + icon_custom_emoji_id: Optional[str] = None + """*Optional*. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed""" diff --git a/aiogram/types/general_forum_topic_hidden.py b/aiogram/types/general_forum_topic_hidden.py new file mode 100644 index 00000000..136a2753 --- /dev/null +++ b/aiogram/types/general_forum_topic_hidden.py @@ -0,0 +1,9 @@ +from aiogram.types import TelegramObject + + +class GeneralForumTopicHidden(TelegramObject): + """ + This object represents a service message about General forum topic hidden in the chat. Currently holds no information. + + Source: https://core.telegram.org/bots/api#generalforumtopichidden + """ diff --git a/aiogram/types/general_forum_topic_unhidden.py b/aiogram/types/general_forum_topic_unhidden.py new file mode 100644 index 00000000..9637a023 --- /dev/null +++ b/aiogram/types/general_forum_topic_unhidden.py @@ -0,0 +1,9 @@ +from aiogram.types import TelegramObject + + +class GeneralForumTopicUnhidden(TelegramObject): + """ + This object represents a service message about General forum topic unhidden in the chat. Currently holds no information. + + Source: https://core.telegram.org/bots/api#generalforumtopicunhidden + """ diff --git a/aiogram/types/input_media_animation.py b/aiogram/types/input_media_animation.py index 194428ec..326438d5 100644 --- a/aiogram/types/input_media_animation.py +++ b/aiogram/types/input_media_animation.py @@ -38,3 +38,5 @@ class InputMediaAnimation(InputMedia): """*Optional*. Animation height""" duration: Optional[int] = None """*Optional*. Animation duration in seconds""" + has_spoiler: Optional[bool] = None + """*Optional*. Pass :code:`True` if the animation needs to be covered with a spoiler animation""" diff --git a/aiogram/types/input_media_photo.py b/aiogram/types/input_media_photo.py index d3eb85d1..1b6f70dd 100644 --- a/aiogram/types/input_media_photo.py +++ b/aiogram/types/input_media_photo.py @@ -30,3 +30,5 @@ class InputMediaPhoto(InputMedia): """*Optional*. Mode for parsing entities in the photo caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" + has_spoiler: Optional[bool] = None + """*Optional*. Pass :code:`True` if the photo needs to be covered with a spoiler animation""" diff --git a/aiogram/types/input_media_video.py b/aiogram/types/input_media_video.py index eb9dd4dd..bf701d9c 100644 --- a/aiogram/types/input_media_video.py +++ b/aiogram/types/input_media_video.py @@ -40,3 +40,5 @@ class InputMediaVideo(InputMedia): """*Optional*. Video duration in seconds""" supports_streaming: Optional[bool] = None """*Optional*. Pass :code:`True` if the uploaded video is suitable for streaming""" + has_spoiler: Optional[bool] = None + """*Optional*. Pass :code:`True` if the video needs to be covered with a spoiler animation""" diff --git a/aiogram/types/message.py b/aiogram/types/message.py index 34a96a63..e22b16c9 100644 --- a/aiogram/types/message.py +++ b/aiogram/types/message.py @@ -50,8 +50,11 @@ if TYPE_CHECKING: from .force_reply import ForceReply from .forum_topic_closed import ForumTopicClosed from .forum_topic_created import ForumTopicCreated + from .forum_topic_edited import ForumTopicEdited from .forum_topic_reopened import ForumTopicReopened from .game import Game + from .general_forum_topic_hidden import GeneralForumTopicHidden + from .general_forum_topic_unhidden import GeneralForumTopicUnhidden from .inline_keyboard_markup import InlineKeyboardMarkup from .input_file import InputFile from .input_media import InputMedia @@ -82,6 +85,7 @@ if TYPE_CHECKING: from .video_note import VideoNote from .voice import Voice from .web_app_data import WebAppData + from .write_access_allowed import WriteAccessAllowed class Message(TelegramObject): @@ -155,6 +159,8 @@ class Message(TelegramObject): """*Optional*. Caption for the animation, audio, document, photo, video or voice""" 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""" + has_media_spoiler: Optional[bool] = None + """*Optional*. :code:`True`, if the message media is covered by a spoiler animation""" contact: Optional[Contact] = None """*Optional*. Message is a shared contact, information about the contact""" dice: Optional[Dice] = None @@ -197,16 +203,24 @@ class Message(TelegramObject): """*Optional*. Message is a service message about a successful payment, information about the payment. `More about payments ยป `_""" connected_website: Optional[str] = None """*Optional*. The domain name of the website on which the user has logged in. `More about Telegram Login ยป `_""" + write_access_allowed: Optional[WriteAccessAllowed] = None + """*Optional*. Service message: the user allowed the bot added to the attachment menu to write messages""" passport_data: Optional[PassportData] = None """*Optional*. Telegram Passport data""" proximity_alert_triggered: Optional[ProximityAlertTriggered] = None """*Optional*. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.""" forum_topic_created: Optional[ForumTopicCreated] = None """*Optional*. Service message: forum topic created""" + forum_topic_edited: Optional[ForumTopicEdited] = None + """*Optional*. Service message: forum topic edited""" forum_topic_closed: Optional[ForumTopicClosed] = None """*Optional*. Service message: forum topic closed""" forum_topic_reopened: Optional[ForumTopicReopened] = None """*Optional*. Service message: forum topic reopened""" + general_forum_topic_hidden: Optional[GeneralForumTopicHidden] = None + """*Optional*. Service message: the 'General' forum topic hidden""" + general_forum_topic_unhidden: Optional[GeneralForumTopicUnhidden] = None + """*Optional*. Service message: the 'General' forum topic unhidden""" video_chat_scheduled: Optional[VideoChatScheduled] = None """*Optional*. Service message: video chat scheduled""" video_chat_started: Optional[VideoChatStarted] = None @@ -328,6 +342,7 @@ class Message(TelegramObject): caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, + has_spoiler: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, allow_sending_without_reply: Optional[bool] = None, @@ -356,6 +371,7 @@ class Message(TelegramObject): :param caption: Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the animation caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* + :param has_spoiler: Pass :code:`True` if the animation needs to be covered with a spoiler animation :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found @@ -379,6 +395,7 @@ class Message(TelegramObject): caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, + has_spoiler=has_spoiler, disable_notification=disable_notification, protect_content=protect_content, allow_sending_without_reply=allow_sending_without_reply, @@ -396,6 +413,7 @@ class Message(TelegramObject): caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, + has_spoiler: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, reply_to_message_id: Optional[int] = None, @@ -424,6 +442,7 @@ class Message(TelegramObject): :param caption: Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the animation caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* + :param has_spoiler: Pass :code:`True` if the animation needs to be covered with a spoiler animation :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_to_message_id: If the message is a reply, ID of the original message @@ -447,6 +466,7 @@ class Message(TelegramObject): caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, + has_spoiler=has_spoiler, disable_notification=disable_notification, protect_content=protect_content, reply_to_message_id=reply_to_message_id, @@ -1463,6 +1483,7 @@ class Message(TelegramObject): caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, + has_spoiler: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, allow_sending_without_reply: Optional[bool] = None, @@ -1487,6 +1508,7 @@ class Message(TelegramObject): :param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the photo caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* + :param has_spoiler: Pass :code:`True` if the photo needs to be covered with a spoiler animation :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found @@ -1506,6 +1528,7 @@ class Message(TelegramObject): caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, + has_spoiler=has_spoiler, disable_notification=disable_notification, protect_content=protect_content, allow_sending_without_reply=allow_sending_without_reply, @@ -1519,6 +1542,7 @@ class Message(TelegramObject): caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, + has_spoiler: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, reply_to_message_id: Optional[int] = None, @@ -1543,6 +1567,7 @@ class Message(TelegramObject): :param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the photo caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* + :param has_spoiler: Pass :code:`True` if the photo needs to be covered with a spoiler animation :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_to_message_id: If the message is a reply, ID of the original message @@ -1562,6 +1587,7 @@ class Message(TelegramObject): caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, + has_spoiler=has_spoiler, disable_notification=disable_notification, protect_content=protect_content, reply_to_message_id=reply_to_message_id, @@ -2068,6 +2094,7 @@ class Message(TelegramObject): caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, + has_spoiler: Optional[bool] = None, supports_streaming: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, @@ -2097,6 +2124,7 @@ class Message(TelegramObject): :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the video caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* + :param has_spoiler: Pass :code:`True` if the video needs to be covered with a spoiler animation :param supports_streaming: Pass :code:`True` if the uploaded video is suitable for streaming :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving @@ -2121,6 +2149,7 @@ class Message(TelegramObject): caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, + has_spoiler=has_spoiler, supports_streaming=supports_streaming, disable_notification=disable_notification, protect_content=protect_content, @@ -2139,6 +2168,7 @@ class Message(TelegramObject): caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, + has_spoiler: Optional[bool] = None, supports_streaming: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, @@ -2168,6 +2198,7 @@ class Message(TelegramObject): :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the video caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* + :param has_spoiler: Pass :code:`True` if the video needs to be covered with a spoiler animation :param supports_streaming: Pass :code:`True` if the uploaded video is suitable for streaming :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving @@ -2192,6 +2223,7 @@ class Message(TelegramObject): caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, + has_spoiler=has_spoiler, supports_streaming=supports_streaming, disable_notification=disable_notification, protect_content=protect_content, diff --git a/aiogram/types/reply_keyboard_markup.py b/aiogram/types/reply_keyboard_markup.py index ed64e660..da2f6214 100644 --- a/aiogram/types/reply_keyboard_markup.py +++ b/aiogram/types/reply_keyboard_markup.py @@ -17,6 +17,8 @@ class ReplyKeyboardMarkup(MutableTelegramObject): keyboard: List[List[KeyboardButton]] """Array of button rows, each represented by an Array of :class:`aiogram.types.keyboard_button.KeyboardButton` objects""" + is_persistent: Optional[bool] = None + """*Optional*. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to *false*, in which case the custom keyboard can be hidden and opened with a keyboard icon.""" resize_keyboard: Optional[bool] = None """*Optional*. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to *false*, in which case the custom keyboard is always of the same height as the app's standard keyboard.""" one_time_keyboard: Optional[bool] = None diff --git a/aiogram/types/write_access_allowed.py b/aiogram/types/write_access_allowed.py new file mode 100644 index 00000000..859280db --- /dev/null +++ b/aiogram/types/write_access_allowed.py @@ -0,0 +1,9 @@ +from aiogram.types import TelegramObject + + +class WriteAccessAllowed(TelegramObject): + """ + This object represents a service message about a user allowing a bot added to the attachment menu to write messages. Currently holds no information. + + Source: https://core.telegram.org/bots/api#writeaccessallowed + """ diff --git a/docs/api/methods/close_general_forum_topic.rst b/docs/api/methods/close_general_forum_topic.rst new file mode 100644 index 00000000..1f2bfe2c --- /dev/null +++ b/docs/api/methods/close_general_forum_topic.rst @@ -0,0 +1,44 @@ +###################### +closeGeneralForumTopic +###################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.close_general_forum_topic + :members: + :member-order: bysource + :undoc-members: True + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.close_general_forum_topic(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.close_general_forum_topic import CloseGeneralForumTopic` +- alias: :code:`from aiogram.methods import CloseGeneralForumTopic` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(CloseGeneralForumTopic(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return CloseGeneralForumTopic(...) diff --git a/docs/api/methods/edit_general_forum_topic.rst b/docs/api/methods/edit_general_forum_topic.rst new file mode 100644 index 00000000..b038c9d3 --- /dev/null +++ b/docs/api/methods/edit_general_forum_topic.rst @@ -0,0 +1,44 @@ +##################### +editGeneralForumTopic +##################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.edit_general_forum_topic + :members: + :member-order: bysource + :undoc-members: True + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.edit_general_forum_topic(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.edit_general_forum_topic import EditGeneralForumTopic` +- alias: :code:`from aiogram.methods import EditGeneralForumTopic` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(EditGeneralForumTopic(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return EditGeneralForumTopic(...) diff --git a/docs/api/methods/hide_general_forum_topic.rst b/docs/api/methods/hide_general_forum_topic.rst new file mode 100644 index 00000000..df36474e --- /dev/null +++ b/docs/api/methods/hide_general_forum_topic.rst @@ -0,0 +1,44 @@ +##################### +hideGeneralForumTopic +##################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.hide_general_forum_topic + :members: + :member-order: bysource + :undoc-members: True + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.hide_general_forum_topic(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.hide_general_forum_topic import HideGeneralForumTopic` +- alias: :code:`from aiogram.methods import HideGeneralForumTopic` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(HideGeneralForumTopic(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return HideGeneralForumTopic(...) diff --git a/docs/api/methods/index.rst b/docs/api/methods/index.rst index 691b928c..7bb7d2b8 100644 --- a/docs/api/methods/index.rst +++ b/docs/api/methods/index.rst @@ -17,6 +17,7 @@ Available methods ban_chat_sender_chat close close_forum_topic + close_general_forum_topic copy_message create_chat_invite_link create_forum_topic @@ -27,6 +28,7 @@ Available methods delete_my_commands edit_chat_invite_link edit_forum_topic + edit_general_forum_topic edit_message_live_location export_chat_invite_link forward_message @@ -41,11 +43,13 @@ Available methods get_my_commands get_my_default_administrator_rights get_user_profile_photos + hide_general_forum_topic leave_chat log_out pin_chat_message promote_chat_member reopen_forum_topic + reopen_general_forum_topic restrict_chat_member revoke_chat_invite_link send_animation @@ -75,6 +79,7 @@ Available methods stop_message_live_location unban_chat_member unban_chat_sender_chat + unhide_general_forum_topic unpin_all_chat_messages unpin_all_forum_topic_messages unpin_chat_message diff --git a/docs/api/methods/reopen_general_forum_topic.rst b/docs/api/methods/reopen_general_forum_topic.rst new file mode 100644 index 00000000..ec217d9c --- /dev/null +++ b/docs/api/methods/reopen_general_forum_topic.rst @@ -0,0 +1,44 @@ +####################### +reopenGeneralForumTopic +####################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.reopen_general_forum_topic + :members: + :member-order: bysource + :undoc-members: True + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.reopen_general_forum_topic(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.reopen_general_forum_topic import ReopenGeneralForumTopic` +- alias: :code:`from aiogram.methods import ReopenGeneralForumTopic` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(ReopenGeneralForumTopic(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return ReopenGeneralForumTopic(...) diff --git a/docs/api/methods/unhide_general_forum_topic.rst b/docs/api/methods/unhide_general_forum_topic.rst new file mode 100644 index 00000000..e2601df8 --- /dev/null +++ b/docs/api/methods/unhide_general_forum_topic.rst @@ -0,0 +1,44 @@ +####################### +unhideGeneralForumTopic +####################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.unhide_general_forum_topic + :members: + :member-order: bysource + :undoc-members: True + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.unhide_general_forum_topic(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.unhide_general_forum_topic import UnhideGeneralForumTopic` +- alias: :code:`from aiogram.methods import UnhideGeneralForumTopic` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(UnhideGeneralForumTopic(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return UnhideGeneralForumTopic(...) diff --git a/docs/api/types/forum_topic_edited.rst b/docs/api/types/forum_topic_edited.rst new file mode 100644 index 00000000..6909332f --- /dev/null +++ b/docs/api/types/forum_topic_edited.rst @@ -0,0 +1,9 @@ +################ +ForumTopicEdited +################ + + +.. automodule:: aiogram.types.forum_topic_edited + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/types/general_forum_topic_hidden.rst b/docs/api/types/general_forum_topic_hidden.rst new file mode 100644 index 00000000..f83b143a --- /dev/null +++ b/docs/api/types/general_forum_topic_hidden.rst @@ -0,0 +1,9 @@ +####################### +GeneralForumTopicHidden +####################### + + +.. automodule:: aiogram.types.general_forum_topic_hidden + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/types/general_forum_topic_unhidden.rst b/docs/api/types/general_forum_topic_unhidden.rst new file mode 100644 index 00000000..9dee46cb --- /dev/null +++ b/docs/api/types/general_forum_topic_unhidden.rst @@ -0,0 +1,9 @@ +######################### +GeneralForumTopicUnhidden +######################### + + +.. automodule:: aiogram.types.general_forum_topic_unhidden + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/types/index.rst b/docs/api/types/index.rst index a5615062..c3b365a9 100644 --- a/docs/api/types/index.rst +++ b/docs/api/types/index.rst @@ -83,7 +83,10 @@ Available types forum_topic forum_topic_closed forum_topic_created + forum_topic_edited forum_topic_reopened + general_forum_topic_hidden + general_forum_topic_unhidden inline_keyboard_button inline_keyboard_markup input_file @@ -125,6 +128,7 @@ Available types voice web_app_data web_app_info + write_access_allowed Telegram Passport ================= diff --git a/docs/api/types/write_access_allowed.rst b/docs/api/types/write_access_allowed.rst new file mode 100644 index 00000000..d2afa3bc --- /dev/null +++ b/docs/api/types/write_access_allowed.rst @@ -0,0 +1,9 @@ +################## +WriteAccessAllowed +################## + + +.. automodule:: aiogram.types.write_access_allowed + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/locale/en/LC_MESSAGES/api/bot.po b/docs/locale/en/LC_MESSAGES/api/bot.po index 8c5c3fc9..6fe7be8c 100644 --- a/docs/locale/en/LC_MESSAGES/api/bot.po +++ b/docs/locale/en/LC_MESSAGES/api/bot.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -46,7 +46,7 @@ msgid "" "[:py:class:`Bot`]" msgstr "" -#: aiogram.client.bot.Bot:1 of +#: aiogram.client.bot.Bot.__init__:1 of msgid "Bot class" msgstr "" @@ -59,8 +59,9 @@ msgstr "" #: aiogram.client.bot.Bot.approve_chat_join_request #: aiogram.client.bot.Bot.ban_chat_member #: aiogram.client.bot.Bot.ban_chat_sender_chat aiogram.client.bot.Bot.close -#: aiogram.client.bot.Bot.close_forum_topic aiogram.client.bot.Bot.context -#: aiogram.client.bot.Bot.copy_message +#: aiogram.client.bot.Bot.close_forum_topic +#: aiogram.client.bot.Bot.close_general_forum_topic +#: aiogram.client.bot.Bot.context aiogram.client.bot.Bot.copy_message #: aiogram.client.bot.Bot.create_chat_invite_link #: aiogram.client.bot.Bot.create_forum_topic #: aiogram.client.bot.Bot.create_invoice_link @@ -76,6 +77,7 @@ msgstr "" #: aiogram.client.bot.Bot.download_file #: aiogram.client.bot.Bot.edit_chat_invite_link #: aiogram.client.bot.Bot.edit_forum_topic +#: aiogram.client.bot.Bot.edit_general_forum_topic #: aiogram.client.bot.Bot.edit_message_caption #: aiogram.client.bot.Bot.edit_message_live_location #: aiogram.client.bot.Bot.edit_message_media @@ -95,10 +97,13 @@ msgstr "" #: aiogram.client.bot.Bot.get_my_default_administrator_rights #: aiogram.client.bot.Bot.get_sticker_set aiogram.client.bot.Bot.get_updates #: aiogram.client.bot.Bot.get_user_profile_photos -#: aiogram.client.bot.Bot.get_webhook_info aiogram.client.bot.Bot.leave_chat -#: aiogram.client.bot.Bot.log_out aiogram.client.bot.Bot.pin_chat_message +#: aiogram.client.bot.Bot.get_webhook_info +#: aiogram.client.bot.Bot.hide_general_forum_topic +#: aiogram.client.bot.Bot.leave_chat aiogram.client.bot.Bot.log_out +#: aiogram.client.bot.Bot.pin_chat_message #: aiogram.client.bot.Bot.promote_chat_member #: aiogram.client.bot.Bot.reopen_forum_topic +#: aiogram.client.bot.Bot.reopen_general_forum_topic #: aiogram.client.bot.Bot.restrict_chat_member #: aiogram.client.bot.Bot.revoke_chat_invite_link #: aiogram.client.bot.Bot.send_animation aiogram.client.bot.Bot.send_audio @@ -126,6 +131,7 @@ msgstr "" #: aiogram.client.bot.Bot.stop_message_live_location #: aiogram.client.bot.Bot.stop_poll aiogram.client.bot.Bot.unban_chat_member #: aiogram.client.bot.Bot.unban_chat_sender_chat +#: aiogram.client.bot.Bot.unhide_general_forum_topic #: aiogram.client.bot.Bot.unpin_all_chat_messages #: aiogram.client.bot.Bot.unpin_all_forum_topic_messages #: aiogram.client.bot.Bot.unpin_chat_message @@ -133,17 +139,17 @@ msgstr "" msgid "Parameters" msgstr "" -#: aiogram.client.bot.Bot.__init__:1 of +#: aiogram.client.bot.Bot.__init__:3 of msgid "Telegram Bot token `Obtained from @BotFather `_" msgstr "" -#: aiogram.client.bot.Bot.__init__:2 of +#: aiogram.client.bot.Bot.__init__:4 of msgid "" "HTTP Client session (For example AiohttpSession). If not specified it " "will be automatically created." msgstr "" -#: aiogram.client.bot.Bot.__init__:4 of +#: aiogram.client.bot.Bot.__init__:6 of msgid "" "Default parse mode. If specified it will be propagated into the API " "methods at runtime." @@ -153,7 +159,7 @@ msgstr "" msgid "Raises" msgstr "" -#: aiogram.client.bot.Bot.__init__:6 of +#: aiogram.client.bot.Bot.__init__:8 of msgid "When token has invalid format this exception will be raised" msgstr "" @@ -170,8 +176,9 @@ msgstr "" #: aiogram.client.bot.Bot.approve_chat_join_request #: aiogram.client.bot.Bot.ban_chat_member #: aiogram.client.bot.Bot.ban_chat_sender_chat aiogram.client.bot.Bot.close -#: aiogram.client.bot.Bot.close_forum_topic aiogram.client.bot.Bot.context -#: aiogram.client.bot.Bot.copy_message +#: aiogram.client.bot.Bot.close_forum_topic +#: aiogram.client.bot.Bot.close_general_forum_topic +#: aiogram.client.bot.Bot.context aiogram.client.bot.Bot.copy_message #: aiogram.client.bot.Bot.create_chat_invite_link #: aiogram.client.bot.Bot.create_forum_topic #: aiogram.client.bot.Bot.create_invoice_link @@ -186,6 +193,7 @@ msgstr "" #: aiogram.client.bot.Bot.delete_webhook #: aiogram.client.bot.Bot.edit_chat_invite_link #: aiogram.client.bot.Bot.edit_forum_topic +#: aiogram.client.bot.Bot.edit_general_forum_topic #: aiogram.client.bot.Bot.edit_message_caption #: aiogram.client.bot.Bot.edit_message_live_location #: aiogram.client.bot.Bot.edit_message_media @@ -205,11 +213,13 @@ msgstr "" #: aiogram.client.bot.Bot.get_my_default_administrator_rights #: aiogram.client.bot.Bot.get_sticker_set aiogram.client.bot.Bot.get_updates #: aiogram.client.bot.Bot.get_user_profile_photos -#: aiogram.client.bot.Bot.get_webhook_info aiogram.client.bot.Bot.id +#: aiogram.client.bot.Bot.get_webhook_info +#: aiogram.client.bot.Bot.hide_general_forum_topic aiogram.client.bot.Bot.id #: aiogram.client.bot.Bot.leave_chat aiogram.client.bot.Bot.log_out -#: aiogram.client.bot.Bot.pin_chat_message +#: aiogram.client.bot.Bot.me aiogram.client.bot.Bot.pin_chat_message #: aiogram.client.bot.Bot.promote_chat_member #: aiogram.client.bot.Bot.reopen_forum_topic +#: aiogram.client.bot.Bot.reopen_general_forum_topic #: aiogram.client.bot.Bot.restrict_chat_member #: aiogram.client.bot.Bot.revoke_chat_invite_link #: aiogram.client.bot.Bot.send_animation aiogram.client.bot.Bot.send_audio @@ -237,6 +247,7 @@ msgstr "" #: aiogram.client.bot.Bot.stop_message_live_location #: aiogram.client.bot.Bot.stop_poll aiogram.client.bot.Bot.unban_chat_member #: aiogram.client.bot.Bot.unban_chat_sender_chat +#: aiogram.client.bot.Bot.unhide_general_forum_topic #: aiogram.client.bot.Bot.unpin_all_chat_messages #: aiogram.client.bot.Bot.unpin_all_forum_topic_messages #: aiogram.client.bot.Bot.unpin_chat_message @@ -248,6 +259,10 @@ msgstr "" msgid "Generate bot context" msgstr "" +#: aiogram.client.bot.Bot.me:1 of +msgid "Cached alias for getMe method" +msgstr "" + #: aiogram.client.bot.Bot.download_file:1 of msgid "Download file by file_path to destination." msgstr "" @@ -367,6 +382,7 @@ msgstr "" #: aiogram.client.bot.Bot.ban_chat_member:7 #: aiogram.client.bot.Bot.ban_chat_sender_chat:5 aiogram.client.bot.Bot.close:3 #: aiogram.client.bot.Bot.close_forum_topic:5 +#: aiogram.client.bot.Bot.close_general_forum_topic:4 #: aiogram.client.bot.Bot.copy_message:15 #: aiogram.client.bot.Bot.create_chat_invite_link:8 #: aiogram.client.bot.Bot.create_forum_topic:7 @@ -382,6 +398,7 @@ msgstr "" #: aiogram.client.bot.Bot.delete_webhook:4 #: aiogram.client.bot.Bot.edit_chat_invite_link:9 #: aiogram.client.bot.Bot.edit_forum_topic:7 +#: aiogram.client.bot.Bot.edit_general_forum_topic:5 #: aiogram.client.bot.Bot.edit_message_caption:10 #: aiogram.client.bot.Bot.edit_message_live_location:12 #: aiogram.client.bot.Bot.edit_message_media:8 @@ -403,23 +420,25 @@ msgstr "" #: aiogram.client.bot.Bot.get_updates:13 #: aiogram.client.bot.Bot.get_user_profile_photos:6 #: aiogram.client.bot.Bot.get_webhook_info:3 +#: aiogram.client.bot.Bot.hide_general_forum_topic:4 #: aiogram.client.bot.Bot.leave_chat:4 aiogram.client.bot.Bot.log_out:3 #: aiogram.client.bot.Bot.pin_chat_message:6 #: aiogram.client.bot.Bot.promote_chat_member:17 #: aiogram.client.bot.Bot.reopen_forum_topic:5 +#: aiogram.client.bot.Bot.reopen_general_forum_topic:4 #: aiogram.client.bot.Bot.restrict_chat_member:7 #: aiogram.client.bot.Bot.revoke_chat_invite_link:5 -#: aiogram.client.bot.Bot.send_animation:18 +#: aiogram.client.bot.Bot.send_animation:19 #: aiogram.client.bot.Bot.send_audio:19 -#: aiogram.client.bot.Bot.send_chat_action:9 +#: aiogram.client.bot.Bot.send_chat_action:10 #: aiogram.client.bot.Bot.send_contact:14 aiogram.client.bot.Bot.send_dice:11 #: aiogram.client.bot.Bot.send_document:16 aiogram.client.bot.Bot.send_game:11 #: aiogram.client.bot.Bot.send_invoice:31 #: aiogram.client.bot.Bot.send_location:16 #: aiogram.client.bot.Bot.send_media_group:10 -#: aiogram.client.bot.Bot.send_message:14 aiogram.client.bot.Bot.send_photo:14 +#: aiogram.client.bot.Bot.send_message:14 aiogram.client.bot.Bot.send_photo:15 #: aiogram.client.bot.Bot.send_poll:22 aiogram.client.bot.Bot.send_sticker:11 -#: aiogram.client.bot.Bot.send_venue:18 aiogram.client.bot.Bot.send_video:19 +#: aiogram.client.bot.Bot.send_venue:18 aiogram.client.bot.Bot.send_video:20 #: aiogram.client.bot.Bot.send_video_note:14 #: aiogram.client.bot.Bot.send_voice:15 #: aiogram.client.bot.Bot.set_chat_administrator_custom_title:6 @@ -440,6 +459,7 @@ msgstr "" #: aiogram.client.bot.Bot.stop_poll:6 #: aiogram.client.bot.Bot.unban_chat_member:6 #: aiogram.client.bot.Bot.unban_chat_sender_chat:5 +#: aiogram.client.bot.Bot.unhide_general_forum_topic:4 #: aiogram.client.bot.Bot.unpin_all_chat_messages:4 #: aiogram.client.bot.Bot.unpin_all_forum_topic_messages:5 #: aiogram.client.bot.Bot.unpin_chat_message:5 @@ -452,6 +472,7 @@ msgstr "" #: aiogram.client.bot.Bot.ban_chat_member:8 #: aiogram.client.bot.Bot.ban_chat_sender_chat:6 #: aiogram.client.bot.Bot.close_forum_topic:6 +#: aiogram.client.bot.Bot.close_general_forum_topic:5 #: aiogram.client.bot.Bot.create_new_sticker_set:13 #: aiogram.client.bot.Bot.decline_chat_join_request:6 #: aiogram.client.bot.Bot.delete_chat_photo:5 @@ -462,10 +483,13 @@ msgstr "" #: aiogram.client.bot.Bot.delete_sticker_from_set:5 #: aiogram.client.bot.Bot.delete_webhook:5 #: aiogram.client.bot.Bot.edit_forum_topic:8 +#: aiogram.client.bot.Bot.edit_general_forum_topic:6 +#: aiogram.client.bot.Bot.hide_general_forum_topic:5 #: aiogram.client.bot.Bot.leave_chat:5 #: aiogram.client.bot.Bot.pin_chat_message:7 #: aiogram.client.bot.Bot.promote_chat_member:18 #: aiogram.client.bot.Bot.reopen_forum_topic:6 +#: aiogram.client.bot.Bot.reopen_general_forum_topic:5 #: aiogram.client.bot.Bot.restrict_chat_member:8 #: aiogram.client.bot.Bot.set_chat_administrator_custom_title:7 #: aiogram.client.bot.Bot.set_chat_description:6 @@ -480,6 +504,7 @@ msgstr "" #: aiogram.client.bot.Bot.set_sticker_set_thumb:7 #: aiogram.client.bot.Bot.unban_chat_member:7 #: aiogram.client.bot.Bot.unban_chat_sender_chat:6 +#: aiogram.client.bot.Bot.unhide_general_forum_topic:5 #: aiogram.client.bot.Bot.unpin_all_chat_messages:5 #: aiogram.client.bot.Bot.unpin_all_forum_topic_messages:6 #: aiogram.client.bot.Bot.unpin_chat_message:6 of @@ -812,15 +837,20 @@ msgid "" msgstr "" #: aiogram.client.bot.Bot.close_forum_topic:3 +#: aiogram.client.bot.Bot.close_general_forum_topic:3 #: aiogram.client.bot.Bot.create_forum_topic:3 #: aiogram.client.bot.Bot.delete_chat_sticker_set:3 #: aiogram.client.bot.Bot.delete_forum_topic:3 #: aiogram.client.bot.Bot.edit_forum_topic:3 +#: aiogram.client.bot.Bot.edit_general_forum_topic:3 +#: aiogram.client.bot.Bot.hide_general_forum_topic:3 #: aiogram.client.bot.Bot.reopen_forum_topic:3 +#: aiogram.client.bot.Bot.reopen_general_forum_topic:3 #: aiogram.client.bot.Bot.restrict_chat_member:3 #: aiogram.client.bot.Bot.set_chat_administrator_custom_title:3 #: aiogram.client.bot.Bot.set_chat_permissions:3 #: aiogram.client.bot.Bot.set_chat_sticker_set:3 +#: aiogram.client.bot.Bot.unhide_general_forum_topic:3 #: aiogram.client.bot.Bot.unpin_all_forum_topic_messages:3 of msgid "" "Unique identifier for the target chat or username of the target " @@ -898,14 +928,14 @@ msgstr "" #: aiogram.client.bot.Bot.copy_message:10 #: aiogram.client.bot.Bot.forward_message:7 -#: aiogram.client.bot.Bot.send_animation:13 +#: aiogram.client.bot.Bot.send_animation:14 #: aiogram.client.bot.Bot.send_audio:14 aiogram.client.bot.Bot.send_contact:9 #: aiogram.client.bot.Bot.send_dice:6 aiogram.client.bot.Bot.send_document:11 #: aiogram.client.bot.Bot.send_game:6 aiogram.client.bot.Bot.send_invoice:26 #: aiogram.client.bot.Bot.send_location:11 -#: aiogram.client.bot.Bot.send_message:9 aiogram.client.bot.Bot.send_photo:9 +#: aiogram.client.bot.Bot.send_message:9 aiogram.client.bot.Bot.send_photo:10 #: aiogram.client.bot.Bot.send_poll:17 aiogram.client.bot.Bot.send_sticker:6 -#: aiogram.client.bot.Bot.send_venue:13 aiogram.client.bot.Bot.send_video:14 +#: aiogram.client.bot.Bot.send_venue:13 aiogram.client.bot.Bot.send_video:15 #: aiogram.client.bot.Bot.send_video_note:9 #: aiogram.client.bot.Bot.send_voice:10 of msgid "" @@ -914,43 +944,43 @@ msgid "" msgstr "" #: aiogram.client.bot.Bot.copy_message:11 -#: aiogram.client.bot.Bot.send_animation:14 +#: aiogram.client.bot.Bot.send_animation:15 #: aiogram.client.bot.Bot.send_audio:15 aiogram.client.bot.Bot.send_contact:10 #: aiogram.client.bot.Bot.send_document:12 aiogram.client.bot.Bot.send_game:7 #: aiogram.client.bot.Bot.send_invoice:27 #: aiogram.client.bot.Bot.send_location:12 -#: aiogram.client.bot.Bot.send_message:10 aiogram.client.bot.Bot.send_photo:10 +#: aiogram.client.bot.Bot.send_message:10 aiogram.client.bot.Bot.send_photo:11 #: aiogram.client.bot.Bot.send_poll:18 aiogram.client.bot.Bot.send_sticker:7 -#: aiogram.client.bot.Bot.send_venue:14 aiogram.client.bot.Bot.send_video:15 +#: aiogram.client.bot.Bot.send_venue:14 aiogram.client.bot.Bot.send_video:16 #: aiogram.client.bot.Bot.send_video_note:10 #: aiogram.client.bot.Bot.send_voice:11 of msgid "Protects the contents of the sent message from forwarding and saving" msgstr "" #: aiogram.client.bot.Bot.copy_message:12 -#: aiogram.client.bot.Bot.send_animation:15 +#: aiogram.client.bot.Bot.send_animation:16 #: aiogram.client.bot.Bot.send_audio:16 aiogram.client.bot.Bot.send_contact:11 #: aiogram.client.bot.Bot.send_dice:8 aiogram.client.bot.Bot.send_document:13 #: aiogram.client.bot.Bot.send_game:8 aiogram.client.bot.Bot.send_invoice:28 #: aiogram.client.bot.Bot.send_location:13 -#: aiogram.client.bot.Bot.send_message:11 aiogram.client.bot.Bot.send_photo:11 +#: aiogram.client.bot.Bot.send_message:11 aiogram.client.bot.Bot.send_photo:12 #: aiogram.client.bot.Bot.send_poll:19 aiogram.client.bot.Bot.send_sticker:8 -#: aiogram.client.bot.Bot.send_venue:15 aiogram.client.bot.Bot.send_video:16 +#: aiogram.client.bot.Bot.send_venue:15 aiogram.client.bot.Bot.send_video:17 #: aiogram.client.bot.Bot.send_video_note:11 #: aiogram.client.bot.Bot.send_voice:12 of msgid "If the message is a reply, ID of the original message" msgstr "" #: aiogram.client.bot.Bot.copy_message:13 -#: aiogram.client.bot.Bot.send_animation:16 +#: aiogram.client.bot.Bot.send_animation:17 #: aiogram.client.bot.Bot.send_audio:17 aiogram.client.bot.Bot.send_contact:12 #: aiogram.client.bot.Bot.send_dice:9 aiogram.client.bot.Bot.send_document:14 #: aiogram.client.bot.Bot.send_game:9 aiogram.client.bot.Bot.send_invoice:29 #: aiogram.client.bot.Bot.send_location:14 #: aiogram.client.bot.Bot.send_media_group:9 -#: aiogram.client.bot.Bot.send_message:12 aiogram.client.bot.Bot.send_photo:12 +#: aiogram.client.bot.Bot.send_message:12 aiogram.client.bot.Bot.send_photo:13 #: aiogram.client.bot.Bot.send_poll:20 aiogram.client.bot.Bot.send_sticker:9 -#: aiogram.client.bot.Bot.send_venue:16 aiogram.client.bot.Bot.send_video:17 +#: aiogram.client.bot.Bot.send_venue:16 aiogram.client.bot.Bot.send_video:18 #: aiogram.client.bot.Bot.send_video_note:12 #: aiogram.client.bot.Bot.send_voice:13 of msgid "" @@ -959,13 +989,13 @@ msgid "" msgstr "" #: aiogram.client.bot.Bot.copy_message:14 -#: aiogram.client.bot.Bot.send_animation:17 +#: aiogram.client.bot.Bot.send_animation:18 #: aiogram.client.bot.Bot.send_audio:18 aiogram.client.bot.Bot.send_contact:13 #: aiogram.client.bot.Bot.send_dice:10 aiogram.client.bot.Bot.send_document:15 #: aiogram.client.bot.Bot.send_location:15 -#: aiogram.client.bot.Bot.send_message:13 aiogram.client.bot.Bot.send_photo:13 +#: aiogram.client.bot.Bot.send_message:13 aiogram.client.bot.Bot.send_photo:14 #: aiogram.client.bot.Bot.send_poll:21 aiogram.client.bot.Bot.send_sticker:10 -#: aiogram.client.bot.Bot.send_venue:17 aiogram.client.bot.Bot.send_video:18 +#: aiogram.client.bot.Bot.send_venue:17 aiogram.client.bot.Bot.send_video:19 #: aiogram.client.bot.Bot.send_video_note:13 #: aiogram.client.bot.Bot.send_voice:14 of msgid "" @@ -1391,14 +1421,17 @@ msgid "" msgstr "" #: aiogram.client.bot.Bot.edit_forum_topic:5 of -msgid "New topic name, 1-128 characters" +msgid "" +"New topic name, 0-128 characters. If not specififed or empty, the current" +" name of the topic will be kept" msgstr "" #: aiogram.client.bot.Bot.edit_forum_topic:6 of msgid "" "New unique identifier of the custom emoji shown as the topic icon. Use " ":class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers`" -" to get all allowed custom emoji identifiers." +" to get all allowed custom emoji identifiers. Pass an empty string to " +"remove the icon. If not specified, the current icon will be kept" msgstr "" #: aiogram.client.bot.Bot.edit_message_caption:1 of @@ -1629,7 +1662,7 @@ msgstr "" #: aiogram.client.bot.Bot.send_contact:15 aiogram.client.bot.Bot.send_dice:12 #: aiogram.client.bot.Bot.send_game:12 aiogram.client.bot.Bot.send_invoice:32 #: aiogram.client.bot.Bot.send_location:17 -#: aiogram.client.bot.Bot.send_message:15 aiogram.client.bot.Bot.send_photo:15 +#: aiogram.client.bot.Bot.send_message:15 aiogram.client.bot.Bot.send_photo:16 #: aiogram.client.bot.Bot.send_poll:23 aiogram.client.bot.Bot.send_sticker:12 #: aiogram.client.bot.Bot.send_venue:19 #: aiogram.client.bot.Bot.send_video_note:15 of @@ -1671,8 +1704,10 @@ msgstr "" #: aiogram.client.bot.Bot.get_chat_member:1 of msgid "" -"Use this method to get information about a member of a chat. Returns a " -":class:`aiogram.types.chat_member.ChatMember` object on success." +"Use this method to get information about a member of a chat. The method " +"is guaranteed to work only if the bot is an administrator in the chat. " +"Returns a :class:`aiogram.types.chat_member.ChatMember` object on " +"success." msgstr "" #: aiogram.client.bot.Bot.get_chat_member:6 of @@ -2186,7 +2221,13 @@ msgid "" "more details." msgstr "" -#: aiogram.client.bot.Bot.send_animation:19 of +#: aiogram.client.bot.Bot.send_animation:13 of +msgid "" +"Pass :code:`True` if the animation needs to be covered with a spoiler " +"animation" +msgstr "" + +#: aiogram.client.bot.Bot.send_animation:20 of msgid "" "Bots can currently send animation files of up to 50 MB in size, this " "limit may be changed in the future." @@ -2281,7 +2322,11 @@ msgid "" "`_." msgstr "" -#: aiogram.client.bot.Bot.send_chat_action:10 of +#: aiogram.client.bot.Bot.send_chat_action:9 of +msgid "Unique identifier for the target message thread; supergroups only" +msgstr "" + +#: aiogram.client.bot.Bot.send_chat_action:11 of msgid "The user will see a 'sending photo' status for the bot." msgstr "" @@ -2548,6 +2593,12 @@ msgid "" "details." msgstr "" +#: aiogram.client.bot.Bot.send_photo:9 of +msgid "" +"Pass :code:`True` if the photo needs to be covered with a spoiler " +"animation" +msgstr "" + #: aiogram.client.bot.Bot.send_poll:1 of msgid "" "Use this method to send a native poll. On success, the sent " @@ -2730,10 +2781,16 @@ msgid "" msgstr "" #: aiogram.client.bot.Bot.send_video:13 of +msgid "" +"Pass :code:`True` if the video needs to be covered with a spoiler " +"animation" +msgstr "" + +#: aiogram.client.bot.Bot.send_video:14 of msgid "Pass :code:`True` if the uploaded video is suitable for streaming" msgstr "" -#: aiogram.client.bot.Bot.send_video:20 of +#: aiogram.client.bot.Bot.send_video:21 of msgid "" "Bots can currently send video files of up to 50 MB in size, this limit " "may be changed in the future." @@ -3227,6 +3284,51 @@ msgstr "" msgid "Returns the uploaded :class:`aiogram.types.file.File` on success." msgstr "" +#: aiogram.client.bot.Bot.close_general_forum_topic:1 of +msgid "" +"Use this method to close an open 'General' topic in a forum supergroup " +"chat. The bot must be an administrator in the chat for this to work and " +"must have the *can_manage_topics* administrator rights. Returns " +":code:`True` on success." +msgstr "" + +#: aiogram.client.bot.Bot.edit_general_forum_topic:1 of +msgid "" +"Use this method to edit the name of the 'General' topic in a forum " +"supergroup chat. The bot must be an administrator in the chat for this to" +" work and must have *can_manage_topics* administrator rights. Returns " +":code:`True` on success." +msgstr "" + +#: aiogram.client.bot.Bot.edit_general_forum_topic:4 of +msgid "New topic name, 1-128 characters" +msgstr "" + +#: aiogram.client.bot.Bot.hide_general_forum_topic:1 of +msgid "" +"Use this method to hide the 'General' topic in a forum supergroup chat. " +"The bot must be an administrator in the chat for this to work and must " +"have the *can_manage_topics* administrator rights. The topic will be " +"automatically closed if it was open. Returns :code:`True` on success." +msgstr "" + +#: aiogram.client.bot.Bot.reopen_general_forum_topic:1 of +msgid "" +"Use this method to reopen a closed 'General' topic in a forum supergroup " +"chat. The bot must be an administrator in the chat for this to work and " +"must have the *can_manage_topics* administrator rights. The topic will be" +" automatically unhidden if it was hidden. Returns :code:`True` on " +"success." +msgstr "" + +#: aiogram.client.bot.Bot.unhide_general_forum_topic:1 of +msgid "" +"Use this method to unhide the 'General' topic in a forum supergroup chat." +" The bot must be an administrator in the chat for this to work and must " +"have the *can_manage_topics* administrator rights. Returns :code:`True` " +"on success." +msgstr "" + #~ msgid "" #~ "Additional interface options. A JSON-" #~ "serialized object for an `inline " @@ -3800,3 +3902,19 @@ msgstr "" #~ "users if the user and their " #~ "neighbors are not among them." #~ msgstr "" + +#~ msgid "" +#~ "New unique identifier of the custom " +#~ "emoji shown as the topic icon. Use" +#~ " " +#~ ":class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers`" +#~ " to get all allowed custom emoji " +#~ "identifiers." +#~ msgstr "" + +#~ msgid "" +#~ "Use this method to get information " +#~ "about a member of a chat. Returns" +#~ " a :class:`aiogram.types.chat_member.ChatMember` object" +#~ " on success." +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/download_file.po b/docs/locale/en/LC_MESSAGES/api/download_file.po index ac95e7e7..bcd3ec0f 100644 --- a/docs/locale/en/LC_MESSAGES/api/download_file.po +++ b/docs/locale/en/LC_MESSAGES/api/download_file.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -62,10 +62,6 @@ msgid "" "default value of destination and handle result of this method." msgstr "" -#: aiogram.client.bot.Bot:1 of -msgid "Bot class" -msgstr "" - #: aiogram.client.bot.Bot.download_file:1 of msgid "Download file by file_path to destination." msgstr "" @@ -186,3 +182,6 @@ msgstr "" #: ../../api/download_file.rst:93 msgid "Example:" msgstr "" + +#~ msgid "Bot class" +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/enums/index.po b/docs/locale/en/LC_MESSAGES/api/enums/index.po index 04fcc637..ad64f7f1 100644 --- a/docs/locale/en/LC_MESSAGES/api/enums/index.po +++ b/docs/locale/en/LC_MESSAGES/api/enums/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,9 +18,12 @@ msgstr "" "Generated-By: Babel 2.10.3\n" #: ../../api/enums/index.rst:3 -msgid "Types" +msgid "Enums" msgstr "" #: ../../api/enums/index.rst:5 msgid "Here is list of all available enums:" msgstr "" + +#~ msgid "Types" +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/edit_forum_topic.po b/docs/locale/en/LC_MESSAGES/api/methods/edit_forum_topic.po index b79ff4c7..711dcfaa 100644 --- a/docs/locale/en/LC_MESSAGES/api/methods/edit_forum_topic.po +++ b/docs/locale/en/LC_MESSAGES/api/methods/edit_forum_topic.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -49,7 +49,9 @@ msgid "Unique identifier for the target message thread of the forum topic" msgstr "" #: ../../docstring aiogram.methods.edit_forum_topic.EditForumTopic.name:1 of -msgid "New topic name, 1-128 characters" +msgid "" +"New topic name, 0-128 characters. If not specififed or empty, the current" +" name of the topic will be kept" msgstr "" #: ../../docstring @@ -57,7 +59,8 @@ msgstr "" msgid "" "New unique identifier of the custom emoji shown as the topic icon. Use " ":class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers`" -" to get all allowed custom emoji identifiers." +" to get all allowed custom emoji identifiers. Pass an empty string to " +"remove the icon. If not specified, the current icon will be kept" msgstr "" #: ../../api/methods/edit_forum_topic.rst:14 @@ -100,3 +103,15 @@ msgstr "" #~ " to get all allowed custom emoji " #~ "identifiers" #~ msgstr "" + +#~ msgid "New topic name, 1-128 characters" +#~ msgstr "" + +#~ msgid "" +#~ "New unique identifier of the custom " +#~ "emoji shown as the topic icon. Use" +#~ " " +#~ ":class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers`" +#~ " to get all allowed custom emoji " +#~ "identifiers." +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/get_chat_member.po b/docs/locale/en/LC_MESSAGES/api/methods/get_chat_member.po index 56aedd83..ae8994c9 100644 --- a/docs/locale/en/LC_MESSAGES/api/methods/get_chat_member.po +++ b/docs/locale/en/LC_MESSAGES/api/methods/get_chat_member.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -30,8 +30,10 @@ msgstr "" #: aiogram.methods.get_chat_member.GetChatMember:1 of msgid "" -"Use this method to get information about a member of a chat. Returns a " -":class:`aiogram.types.chat_member.ChatMember` object on success." +"Use this method to get information about a member of a chat. The method " +"is guaranteed to work only if the bot is an administrator in the chat. " +"Returns a :class:`aiogram.types.chat_member.ChatMember` object on " +"success." msgstr "" #: aiogram.methods.get_chat_member.GetChatMember:3 of @@ -83,3 +85,10 @@ msgstr "" #: ../../api/methods/get_chat_member.rst:45 msgid ":meth:`aiogram.types.chat.Chat.get_member`" msgstr "" + +#~ msgid "" +#~ "Use this method to get information " +#~ "about a member of a chat. Returns" +#~ " a :class:`aiogram.types.chat_member.ChatMember` object" +#~ " on success." +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/send_animation.po b/docs/locale/en/LC_MESSAGES/api/methods/send_animation.po index d84eff42..57619de4 100644 --- a/docs/locale/en/LC_MESSAGES/api/methods/send_animation.po +++ b/docs/locale/en/LC_MESSAGES/api/methods/send_animation.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -104,6 +104,13 @@ msgid "" "which can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring aiogram.methods.send_animation.SendAnimation.has_spoiler:1 +#: of +msgid "" +"Pass :code:`True` if the animation needs to be covered with a spoiler " +"animation" +msgstr "" + #: ../../docstring #: aiogram.methods.send_animation.SendAnimation.disable_notification:1 of msgid "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/send_chat_action.po b/docs/locale/en/LC_MESSAGES/api/methods/send_chat_action.po index e69951eb..b379f03c 100644 --- a/docs/locale/en/LC_MESSAGES/api/methods/send_chat_action.po +++ b/docs/locale/en/LC_MESSAGES/api/methods/send_chat_action.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -76,6 +76,11 @@ msgid "" "`_." msgstr "" +#: ../../docstring +#: aiogram.methods.send_chat_action.SendChatAction.message_thread_id:1 of +msgid "Unique identifier for the target message thread; supergroups only" +msgstr "" + #: ../../api/methods/send_chat_action.rst:14 msgid "Usage" msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/send_photo.po b/docs/locale/en/LC_MESSAGES/api/methods/send_photo.po index 496a13a5..440f3fb0 100644 --- a/docs/locale/en/LC_MESSAGES/api/methods/send_photo.po +++ b/docs/locale/en/LC_MESSAGES/api/methods/send_photo.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -77,6 +77,12 @@ msgid "" "which can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring aiogram.methods.send_photo.SendPhoto.has_spoiler:1 of +msgid "" +"Pass :code:`True` if the photo needs to be covered with a spoiler " +"animation" +msgstr "" + #: ../../docstring aiogram.methods.send_photo.SendPhoto.disable_notification:1 #: of msgid "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/send_video.po b/docs/locale/en/LC_MESSAGES/api/methods/send_video.po index 55651775..5a575db2 100644 --- a/docs/locale/en/LC_MESSAGES/api/methods/send_video.po +++ b/docs/locale/en/LC_MESSAGES/api/methods/send_video.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -103,6 +103,12 @@ msgid "" "which can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring aiogram.methods.send_video.SendVideo.has_spoiler:1 of +msgid "" +"Pass :code:`True` if the video needs to be covered with a spoiler " +"animation" +msgstr "" + #: ../../docstring aiogram.methods.send_video.SendVideo.supports_streaming:1 of msgid "Pass :code:`True` if the uploaded video is suitable for streaming" msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/chat.po b/docs/locale/en/LC_MESSAGES/api/types/chat.po index 802289d3..13a50fa1 100644 --- a/docs/locale/en/LC_MESSAGES/api/types/chat.po +++ b/docs/locale/en/LC_MESSAGES/api/types/chat.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -162,6 +162,21 @@ msgid "" ":class:`aiogram.methods.get_chat.GetChat`." msgstr "" +#: ../../docstring aiogram.types.chat.Chat.has_aggressive_anti_spam_enabled:1 +#: of +msgid "" +"*Optional*. :code:`True`, if aggressive anti-spam checks are enabled in " +"the supergroup. The field is only available to chat administrators. " +"Returned only in :class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.has_hidden_members:1 of +msgid "" +"*Optional*. :code:`True`, if non-administrators can only get the list of " +"bots and administrators in the chat. Returned only in " +":class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + #: ../../docstring aiogram.types.chat.Chat.has_protected_content:1 of msgid "" "*Optional*. :code:`True`, if messages from the chat can't be forwarded to" @@ -641,6 +656,10 @@ msgid "" msgstr "" #: aiogram.types.chat.Chat.do:15 of +msgid "Unique identifier for the target message thread; supergroups only" +msgstr "" + +#: aiogram.types.chat.Chat.do:16 of msgid "" "instance of method " ":class:`aiogram.methods.send_chat_action.SendChatAction`" @@ -713,8 +732,10 @@ msgstr "" #: aiogram.types.chat.Chat.get_member:6 of msgid "" -"Use this method to get information about a member of a chat. Returns a " -":class:`aiogram.types.chat_member.ChatMember` object on success." +"Use this method to get information about a member of a chat. The method " +"is guaranteed to work only if the bot is an administrator in the chat. " +"Returns a :class:`aiogram.types.chat_member.ChatMember` object on " +"success." msgstr "" #: aiogram.types.chat.Chat.get_member:8 of @@ -1235,3 +1256,10 @@ msgstr "" #: aiogram.types.chat.Chat.set_photo:11 of msgid "instance of method :class:`aiogram.methods.set_chat_photo.SetChatPhoto`" msgstr "" + +#~ msgid "" +#~ "Use this method to get information " +#~ "about a member of a chat. Returns" +#~ " a :class:`aiogram.types.chat_member.ChatMember` object" +#~ " on success." +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/error_event.po b/docs/locale/en/LC_MESSAGES/api/types/error_event.po index 6cf3b36c..fbaceb09 100644 --- a/docs/locale/en/LC_MESSAGES/api/types/error_event.po +++ b/docs/locale/en/LC_MESSAGES/api/types/error_event.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -27,6 +27,10 @@ msgid "" " from Telegram" msgstr "" +#: aiogram.types.error_event.ErrorEvent:3 of +msgid "Source: https://core.telegram.org/bots/api#error-event" +msgstr "" + #: ../../docstring aiogram.types.error_event.ErrorEvent.update:1 of msgid "Received update" msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/index.po b/docs/locale/en/LC_MESSAGES/api/types/index.po index c7493068..8ee34c1a 100644 --- a/docs/locale/en/LC_MESSAGES/api/types/index.po +++ b/docs/locale/en/LC_MESSAGES/api/types/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -33,25 +33,29 @@ msgstr "" msgid "Available types" msgstr "" -#: ../../api/types/index.rst:130 +#: ../../api/types/index.rst:134 msgid "Telegram Passport" msgstr "" -#: ../../api/types/index.rst:151 +#: ../../api/types/index.rst:155 msgid "Getting updates" msgstr "" -#: ../../api/types/index.rst:160 +#: ../../api/types/index.rst:164 msgid "Stickers" msgstr "" -#: ../../api/types/index.rst:170 +#: ../../api/types/index.rst:174 msgid "Payments" msgstr "" -#: ../../api/types/index.rst:185 +#: ../../api/types/index.rst:189 msgid "Games" msgstr "" +#: ../../api/types/index.rst:199 +msgid "Internals" +msgstr "" + #~ msgid "Internal events" #~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/input_media_animation.po b/docs/locale/en/LC_MESSAGES/api/types/input_media_animation.po index 3a0bffbb..e19c352d 100644 --- a/docs/locale/en/LC_MESSAGES/api/types/input_media_animation.po +++ b/docs/locale/en/LC_MESSAGES/api/types/input_media_animation.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -97,3 +97,10 @@ msgstr "" #: aiogram.types.input_media_animation.InputMediaAnimation.duration:1 of msgid "*Optional*. Animation duration in seconds" msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_animation.InputMediaAnimation.has_spoiler:1 of +msgid "" +"*Optional*. Pass :code:`True` if the animation needs to be covered with a" +" spoiler animation" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/input_media_photo.po b/docs/locale/en/LC_MESSAGES/api/types/input_media_photo.po index 5d6f0814..10a634e9 100644 --- a/docs/locale/en/LC_MESSAGES/api/types/input_media_photo.po +++ b/docs/locale/en/LC_MESSAGES/api/types/input_media_photo.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -62,3 +62,10 @@ msgid "" "*Optional*. List of special entities that appear in the caption, which " "can be specified instead of *parse_mode*" msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_photo.InputMediaPhoto.has_spoiler:1 of +msgid "" +"*Optional*. Pass :code:`True` if the photo needs to be covered with a " +"spoiler animation" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/input_media_video.po b/docs/locale/en/LC_MESSAGES/api/types/input_media_video.po index fc4f2e44..eef2e134 100644 --- a/docs/locale/en/LC_MESSAGES/api/types/input_media_video.po +++ b/docs/locale/en/LC_MESSAGES/api/types/input_media_video.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -95,3 +95,10 @@ msgid "" "*Optional*. Pass :code:`True` if the uploaded video is suitable for " "streaming" msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_video.InputMediaVideo.has_spoiler:1 of +msgid "" +"*Optional*. Pass :code:`True` if the video needs to be covered with a " +"spoiler animation" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/message.po b/docs/locale/en/LC_MESSAGES/api/types/message.po index b51e09c8..516aa013 100644 --- a/docs/locale/en/LC_MESSAGES/api/types/message.po +++ b/docs/locale/en/LC_MESSAGES/api/types/message.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -199,6 +199,12 @@ msgid "" " URLs, bot commands, etc. that appear in the caption" msgstr "" +#: ../../docstring aiogram.types.message.Message.has_media_spoiler:1 of +msgid "" +"*Optional*. :code:`True`, if the message media is covered by a spoiler " +"animation" +msgstr "" + #: ../../docstring aiogram.types.message.Message.contact:1 of msgid "*Optional*. Message is a shared contact, information about the contact" msgstr "" @@ -329,6 +335,12 @@ msgid "" "`_" msgstr "" +#: ../../docstring aiogram.types.message.Message.write_access_allowed:1 of +msgid "" +"*Optional*. Service message: the user allowed the bot added to the " +"attachment menu to write messages" +msgstr "" + #: ../../docstring aiogram.types.message.Message.passport_data:1 of msgid "*Optional*. Telegram Passport data" msgstr "" @@ -343,6 +355,10 @@ msgstr "" msgid "*Optional*. Service message: forum topic created" msgstr "" +#: ../../docstring aiogram.types.message.Message.forum_topic_edited:1 of +msgid "*Optional*. Service message: forum topic edited" +msgstr "" + #: ../../docstring aiogram.types.message.Message.forum_topic_closed:1 of msgid "*Optional*. Service message: forum topic closed" msgstr "" @@ -351,6 +367,16 @@ msgstr "" msgid "*Optional*. Service message: forum topic reopened" msgstr "" +#: ../../docstring aiogram.types.message.Message.general_forum_topic_hidden:1 +#: of +msgid "*Optional*. Service message: the 'General' forum topic hidden" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.general_forum_topic_unhidden:1 +#: of +msgid "*Optional*. Service message: the 'General' forum topic unhidden" +msgstr "" + #: ../../docstring aiogram.types.message.Message.video_chat_scheduled:1 of msgid "*Optional*. Service message: video chat scheduled" msgstr "" @@ -627,8 +653,15 @@ msgid "" "which can be specified instead of *parse_mode*" msgstr "" -#: aiogram.types.message.Message.answer:15 #: aiogram.types.message.Message.answer_animation:19 +#: aiogram.types.message.Message.reply_animation:20 of +msgid "" +"Pass :code:`True` if the animation needs to be covered with a spoiler " +"animation" +msgstr "" + +#: aiogram.types.message.Message.answer:15 +#: aiogram.types.message.Message.answer_animation:20 #: aiogram.types.message.Message.answer_audio:20 #: aiogram.types.message.Message.answer_contact:15 #: aiogram.types.message.Message.answer_dice:12 @@ -636,17 +669,17 @@ msgstr "" #: aiogram.types.message.Message.answer_game:12 #: aiogram.types.message.Message.answer_invoice:32 #: aiogram.types.message.Message.answer_location:17 -#: aiogram.types.message.Message.answer_photo:15 +#: aiogram.types.message.Message.answer_photo:16 #: aiogram.types.message.Message.answer_poll:23 #: aiogram.types.message.Message.answer_sticker:12 #: aiogram.types.message.Message.answer_venue:19 -#: aiogram.types.message.Message.answer_video:20 +#: aiogram.types.message.Message.answer_video:21 #: aiogram.types.message.Message.answer_video_note:15 #: aiogram.types.message.Message.answer_voice:16 #: aiogram.types.message.Message.copy_to:16 #: aiogram.types.message.Message.forward:13 #: aiogram.types.message.Message.reply:16 -#: aiogram.types.message.Message.reply_animation:20 +#: aiogram.types.message.Message.reply_animation:21 #: aiogram.types.message.Message.reply_audio:21 #: aiogram.types.message.Message.reply_contact:16 #: aiogram.types.message.Message.reply_dice:13 @@ -654,11 +687,11 @@ msgstr "" #: aiogram.types.message.Message.reply_game:13 #: aiogram.types.message.Message.reply_invoice:33 #: aiogram.types.message.Message.reply_location:18 -#: aiogram.types.message.Message.reply_photo:16 +#: aiogram.types.message.Message.reply_photo:17 #: aiogram.types.message.Message.reply_poll:24 #: aiogram.types.message.Message.reply_sticker:13 #: aiogram.types.message.Message.reply_venue:20 -#: aiogram.types.message.Message.reply_video:21 +#: aiogram.types.message.Message.reply_video:22 #: aiogram.types.message.Message.reply_video_note:16 #: aiogram.types.message.Message.reply_voice:17 of msgid "" @@ -667,41 +700,41 @@ msgid "" msgstr "" #: aiogram.types.message.Message.answer:16 -#: aiogram.types.message.Message.answer_animation:20 +#: aiogram.types.message.Message.answer_animation:21 #: aiogram.types.message.Message.answer_audio:21 #: aiogram.types.message.Message.answer_contact:16 #: aiogram.types.message.Message.answer_document:18 #: aiogram.types.message.Message.answer_game:13 #: aiogram.types.message.Message.answer_invoice:33 #: aiogram.types.message.Message.answer_location:18 -#: aiogram.types.message.Message.answer_photo:16 +#: aiogram.types.message.Message.answer_photo:17 #: aiogram.types.message.Message.answer_poll:24 #: aiogram.types.message.Message.answer_sticker:13 #: aiogram.types.message.Message.answer_venue:20 -#: aiogram.types.message.Message.answer_video:21 +#: aiogram.types.message.Message.answer_video:22 #: aiogram.types.message.Message.answer_video_note:16 #: aiogram.types.message.Message.answer_voice:17 #: aiogram.types.message.Message.copy_to:17 #: aiogram.types.message.Message.reply:17 -#: aiogram.types.message.Message.reply_animation:21 +#: aiogram.types.message.Message.reply_animation:22 #: aiogram.types.message.Message.reply_audio:22 #: aiogram.types.message.Message.reply_contact:17 #: aiogram.types.message.Message.reply_document:19 #: aiogram.types.message.Message.reply_game:14 #: aiogram.types.message.Message.reply_invoice:34 #: aiogram.types.message.Message.reply_location:19 -#: aiogram.types.message.Message.reply_photo:17 +#: aiogram.types.message.Message.reply_photo:18 #: aiogram.types.message.Message.reply_poll:25 #: aiogram.types.message.Message.reply_sticker:14 #: aiogram.types.message.Message.reply_venue:21 -#: aiogram.types.message.Message.reply_video:22 +#: aiogram.types.message.Message.reply_video:23 #: aiogram.types.message.Message.reply_video_note:17 #: aiogram.types.message.Message.reply_voice:18 of msgid "Protects the contents of the sent message from forwarding and saving" msgstr "" #: aiogram.types.message.Message.answer:18 -#: aiogram.types.message.Message.answer_animation:22 +#: aiogram.types.message.Message.answer_animation:23 #: aiogram.types.message.Message.answer_audio:23 #: aiogram.types.message.Message.answer_contact:18 #: aiogram.types.message.Message.answer_dice:15 @@ -710,16 +743,16 @@ msgstr "" #: aiogram.types.message.Message.answer_invoice:35 #: aiogram.types.message.Message.answer_location:20 #: aiogram.types.message.Message.answer_media_group:15 -#: aiogram.types.message.Message.answer_photo:18 +#: aiogram.types.message.Message.answer_photo:19 #: aiogram.types.message.Message.answer_poll:26 #: aiogram.types.message.Message.answer_sticker:15 #: aiogram.types.message.Message.answer_venue:22 -#: aiogram.types.message.Message.answer_video:23 +#: aiogram.types.message.Message.answer_video:24 #: aiogram.types.message.Message.answer_video_note:18 #: aiogram.types.message.Message.answer_voice:19 #: aiogram.types.message.Message.copy_to:19 #: aiogram.types.message.Message.reply:18 -#: aiogram.types.message.Message.reply_animation:22 +#: aiogram.types.message.Message.reply_animation:23 #: aiogram.types.message.Message.reply_audio:23 #: aiogram.types.message.Message.reply_contact:18 #: aiogram.types.message.Message.reply_dice:15 @@ -728,11 +761,11 @@ msgstr "" #: aiogram.types.message.Message.reply_invoice:35 #: aiogram.types.message.Message.reply_location:20 #: aiogram.types.message.Message.reply_media_group:15 -#: aiogram.types.message.Message.reply_photo:18 +#: aiogram.types.message.Message.reply_photo:19 #: aiogram.types.message.Message.reply_poll:26 #: aiogram.types.message.Message.reply_sticker:15 #: aiogram.types.message.Message.reply_venue:22 -#: aiogram.types.message.Message.reply_video:23 +#: aiogram.types.message.Message.reply_video:24 #: aiogram.types.message.Message.reply_video_note:18 #: aiogram.types.message.Message.reply_voice:19 of msgid "" @@ -741,32 +774,32 @@ msgid "" msgstr "" #: aiogram.types.message.Message.answer:19 -#: aiogram.types.message.Message.answer_animation:23 +#: aiogram.types.message.Message.answer_animation:24 #: aiogram.types.message.Message.answer_audio:24 #: aiogram.types.message.Message.answer_contact:19 #: aiogram.types.message.Message.answer_dice:16 #: aiogram.types.message.Message.answer_document:21 #: aiogram.types.message.Message.answer_location:21 -#: aiogram.types.message.Message.answer_photo:19 +#: aiogram.types.message.Message.answer_photo:20 #: aiogram.types.message.Message.answer_poll:27 #: aiogram.types.message.Message.answer_sticker:16 #: aiogram.types.message.Message.answer_venue:23 -#: aiogram.types.message.Message.answer_video:24 +#: aiogram.types.message.Message.answer_video:25 #: aiogram.types.message.Message.answer_video_note:19 #: aiogram.types.message.Message.answer_voice:20 #: aiogram.types.message.Message.copy_to:20 #: aiogram.types.message.Message.reply:19 -#: aiogram.types.message.Message.reply_animation:23 +#: aiogram.types.message.Message.reply_animation:24 #: aiogram.types.message.Message.reply_audio:24 #: aiogram.types.message.Message.reply_contact:19 #: aiogram.types.message.Message.reply_dice:16 #: aiogram.types.message.Message.reply_document:21 #: aiogram.types.message.Message.reply_location:21 -#: aiogram.types.message.Message.reply_photo:19 +#: aiogram.types.message.Message.reply_photo:20 #: aiogram.types.message.Message.reply_poll:27 #: aiogram.types.message.Message.reply_sticker:16 #: aiogram.types.message.Message.reply_venue:23 -#: aiogram.types.message.Message.reply_video:24 +#: aiogram.types.message.Message.reply_video:25 #: aiogram.types.message.Message.reply_video_note:19 #: aiogram.types.message.Message.reply_voice:20 of msgid "" @@ -824,13 +857,13 @@ msgstr "" msgid "Returns" msgstr "" -#: aiogram.types.message.Message.answer_animation:24 -#: aiogram.types.message.Message.reply_animation:24 of +#: aiogram.types.message.Message.answer_animation:25 +#: aiogram.types.message.Message.reply_animation:25 of msgid "instance of method :class:`aiogram.methods.send_animation.SendAnimation`" msgstr "" #: aiogram.types.message.Message.answer:17 -#: aiogram.types.message.Message.answer_animation:21 +#: aiogram.types.message.Message.answer_animation:22 #: aiogram.types.message.Message.answer_audio:22 #: aiogram.types.message.Message.answer_contact:17 #: aiogram.types.message.Message.answer_dice:14 @@ -838,11 +871,11 @@ msgstr "" #: aiogram.types.message.Message.answer_game:14 #: aiogram.types.message.Message.answer_invoice:34 #: aiogram.types.message.Message.answer_location:19 -#: aiogram.types.message.Message.answer_photo:17 +#: aiogram.types.message.Message.answer_photo:18 #: aiogram.types.message.Message.answer_poll:25 #: aiogram.types.message.Message.answer_sticker:14 #: aiogram.types.message.Message.answer_venue:21 -#: aiogram.types.message.Message.answer_video:22 +#: aiogram.types.message.Message.answer_video:23 #: aiogram.types.message.Message.answer_video_note:17 #: aiogram.types.message.Message.answer_voice:18 #: aiogram.types.message.Message.copy_to:18 of @@ -1450,8 +1483,15 @@ msgid "" "details." msgstr "" -#: aiogram.types.message.Message.answer_photo:20 -#: aiogram.types.message.Message.reply_photo:20 of +#: aiogram.types.message.Message.answer_photo:15 +#: aiogram.types.message.Message.reply_photo:16 of +msgid "" +"Pass :code:`True` if the photo needs to be covered with a spoiler " +"animation" +msgstr "" + +#: aiogram.types.message.Message.answer_photo:21 +#: aiogram.types.message.Message.reply_photo:21 of msgid "instance of method :class:`aiogram.methods.send_photo.SendPhoto`" msgstr "" @@ -1772,11 +1812,18 @@ msgstr "" #: aiogram.types.message.Message.answer_video:19 #: aiogram.types.message.Message.reply_video:20 of +msgid "" +"Pass :code:`True` if the video needs to be covered with a spoiler " +"animation" +msgstr "" + +#: aiogram.types.message.Message.answer_video:20 +#: aiogram.types.message.Message.reply_video:21 of msgid "Pass :code:`True` if the uploaded video is suitable for streaming" msgstr "" -#: aiogram.types.message.Message.answer_video:25 -#: aiogram.types.message.Message.reply_video:25 of +#: aiogram.types.message.Message.answer_video:26 +#: aiogram.types.message.Message.reply_video:26 of msgid "instance of method :class:`aiogram.methods.send_video.SendVideo`" msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/reply_keyboard_markup.po b/docs/locale/en/LC_MESSAGES/api/types/reply_keyboard_markup.po index 43841e57..4f2b1f86 100644 --- a/docs/locale/en/LC_MESSAGES/api/types/reply_keyboard_markup.po +++ b/docs/locale/en/LC_MESSAGES/api/types/reply_keyboard_markup.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -41,6 +41,14 @@ msgid "" ":class:`aiogram.types.keyboard_button.KeyboardButton` objects" msgstr "" +#: ../../docstring +#: aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup.is_persistent:1 of +msgid "" +"*Optional*. Requests clients to always show the keyboard when the regular" +" keyboard is hidden. Defaults to *false*, in which case the custom " +"keyboard can be hidden and opened with a keyboard icon." +msgstr "" + #: ../../docstring #: aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup.resize_keyboard:1 of msgid "" diff --git a/docs/locale/en/LC_MESSAGES/changelog.po b/docs/locale/en/LC_MESSAGES/changelog.po index 7aa01990..6f0f541b 100644 --- a/docs/locale/en/LC_MESSAGES/changelog.po +++ b/docs/locale/en/LC_MESSAGES/changelog.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -22,7 +22,7 @@ msgid "Changelog" msgstr "" #: ../../[towncrier-fragments]:2 -msgid "\\ |release| [UNRELEASED DRAFT] (2022-11-23)" +msgid "\\ |release| [UNRELEASED DRAFT] (2022-12-30)" msgstr "" #: ../../../CHANGES.rst:23 ../../../CHANGES.rst:83 ../../../CHANGES.rst:134 @@ -33,20 +33,108 @@ msgid "Features" msgstr "" #: ../../[towncrier-fragments]:7 +msgid "Added missing shortcuts, new enums, reworked old stuff" +msgstr "" + +#: ../../[towncrier-fragments]:9 msgid "" -"Added missing shortcuts, new enums, reworked old stuff `#952 " -"`_" +"**Breaking** All previously added enums is re-generated in new place - " +"`aiogram.enums` instead of `aiogram.types`" +msgstr "" + +#: ../../[towncrier-fragments]:27 +msgid "" +"**Added enums:** " +":class:`aiogram.enums.bot_command_scope_type.BotCommandScopeType`," +msgstr "" + +#: ../../[towncrier-fragments]:13 +msgid "" +":class:`aiogram.enums.chat_action.ChatActions`, " +":class:`aiogram.enums.chat_member_status.ChatMemberStatus`, " +":class:`aiogram.enums.chat_type.ChatType`, " +":class:`aiogram.enums.content_type.ContentType`, " +":class:`aiogram.enums.dice_emoji.DiceEmoji`, " +":class:`aiogram.enums.inline_query_result_type.InlineQueryResultType`, " +":class:`aiogram.enums.input_media_type.InputMediaType`, " +":class:`aiogram.enums.mask_position_point.MaskPositionPoint`, " +":class:`aiogram.enums.menu_button_type.MenuButtonType`, " +":class:`aiogram.enums.message_entity_type.MessageEntityType`, " +":class:`aiogram.enums.parse_mode.ParseMode`, " +":class:`aiogram.enums.poll_type.PollType`, " +":class:`aiogram.enums.sticker_type.StickerType`, " +":class:`aiogram.enums.topic_icon_color.TopicIconColor`, " +":class:`aiogram.enums.update_type.UpdateType`," +msgstr "" + +#: ../../[towncrier-fragments]:29 +msgid "**Added shortcuts**:" +msgstr "" + +#: ../../[towncrier-fragments]:54 +msgid "*Chat* :meth:`aiogram.types.chat.Chat.get_administrators`," +msgstr "" + +#: ../../[towncrier-fragments]:32 +msgid "" +":meth:`aiogram.types.chat.Chat.delete_message`, " +":meth:`aiogram.types.chat.Chat.revoke_invite_link`, " +":meth:`aiogram.types.chat.Chat.edit_invite_link`, " +":meth:`aiogram.types.chat.Chat.create_invite_link`, " +":meth:`aiogram.types.chat.Chat.export_invite_link`, " +":meth:`aiogram.types.chat.Chat.do`, " +":meth:`aiogram.types.chat.Chat.delete_sticker_set`, " +":meth:`aiogram.types.chat.Chat.set_sticker_set`, " +":meth:`aiogram.types.chat.Chat.get_member`, " +":meth:`aiogram.types.chat.Chat.get_member_count`, " +":meth:`aiogram.types.chat.Chat.leave`, " +":meth:`aiogram.types.chat.Chat.unpin_all_messages`, " +":meth:`aiogram.types.chat.Chat.unpin_message`, " +":meth:`aiogram.types.chat.Chat.pin_message`, " +":meth:`aiogram.types.chat.Chat.set_administrator_custom_title`, " +":meth:`aiogram.types.chat.Chat.set_permissions`, " +":meth:`aiogram.types.chat.Chat.promote`, " +":meth:`aiogram.types.chat.Chat.restrict`, " +":meth:`aiogram.types.chat.Chat.unban`, " +":meth:`aiogram.types.chat.Chat.ban`, " +":meth:`aiogram.types.chat.Chat.set_description`, " +":meth:`aiogram.types.chat.Chat.set_title`, " +":meth:`aiogram.types.chat.Chat.delete_photo`, " +":meth:`aiogram.types.chat.Chat.set_photo`," +msgstr "" + +#: ../../[towncrier-fragments]:56 +msgid "*Sticker*: :meth:`aiogram.types.sticker.Sticker.set_position_in_set`," +msgstr "" + +#: ../../[towncrier-fragments]:57 +msgid ":meth:`aiogram.types.sticker.Sticker.delete_from_set`," +msgstr "" + +#: ../../[towncrier-fragments]:58 +msgid "*User*: :meth:`aiogram.types.user.User.get_profile_photos`" +msgstr "" + +#: ../../[towncrier-fragments]:59 +msgid "`#952 `_" +msgstr "" + +#: ../../[towncrier-fragments]:60 +msgid "" +"Added full support of `Bot API 6.4 `_ `#1088 " +"`_" msgstr "" #: ../../../CHANGES.rst:71 ../../../CHANGES.rst:124 ../../../CHANGES.rst:175 #: ../../../CHANGES.rst:229 ../../../CHANGES.rst:271 ../../../CHANGES.rst:317 #: ../../../CHANGES.rst:377 ../../../CHANGES.rst:398 ../../../CHANGES.rst:421 #: ../../../CHANGES.rst:458 ../../../CHANGES.rst:497 -#: ../../[towncrier-fragments]:12 +#: ../../[towncrier-fragments]:65 msgid "Misc" msgstr "" -#: ../../[towncrier-fragments]:14 +#: ../../[towncrier-fragments]:67 msgid "" "Added integration with new code-generator named `Butcher " "`_ `#1069 " @@ -2405,3 +2493,12 @@ msgstr "" #~ ":code:`ChatMemberStatus.yml` was renamed to " #~ ":code:`is_chat_member` and :code:`is_chat_admin`" #~ msgstr "" + +#~ msgid "\\ |release| [UNRELEASED DRAFT] (2022-11-23)" +#~ msgstr "" + +#~ msgid "" +#~ "Added missing shortcuts, new enums, " +#~ "reworked old stuff `#952 " +#~ "`_" +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/index.po b/docs/locale/en/LC_MESSAGES/index.po index 7bc19d51..5ac82a19 100644 --- a/docs/locale/en/LC_MESSAGES/index.po +++ b/docs/locale/en/LC_MESSAGES/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-03 01:03+0300\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -123,7 +123,7 @@ msgstr "" #: ../../../README.rst:70 msgid "" -"Supports `Telegram Bot API 6.3 `_ and" +"Supports `Telegram Bot API 6.4 `_ and" " gets fast updates to the latest versions of the Bot API" msgstr "" @@ -216,3 +216,10 @@ msgstr "" #~ msgid "Uses powerful :ref:`magic filters `" #~ msgstr "" + +#~ msgid "" +#~ "Supports `Telegram Bot API 6.3 " +#~ "`_ and gets fast" +#~ " updates to the latest versions of" +#~ " the Bot API" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/bot.po b/docs/locale/uk_UA/LC_MESSAGES/api/bot.po index 8c5c3fc9..6fe7be8c 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/bot.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/bot.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -46,7 +46,7 @@ msgid "" "[:py:class:`Bot`]" msgstr "" -#: aiogram.client.bot.Bot:1 of +#: aiogram.client.bot.Bot.__init__:1 of msgid "Bot class" msgstr "" @@ -59,8 +59,9 @@ msgstr "" #: aiogram.client.bot.Bot.approve_chat_join_request #: aiogram.client.bot.Bot.ban_chat_member #: aiogram.client.bot.Bot.ban_chat_sender_chat aiogram.client.bot.Bot.close -#: aiogram.client.bot.Bot.close_forum_topic aiogram.client.bot.Bot.context -#: aiogram.client.bot.Bot.copy_message +#: aiogram.client.bot.Bot.close_forum_topic +#: aiogram.client.bot.Bot.close_general_forum_topic +#: aiogram.client.bot.Bot.context aiogram.client.bot.Bot.copy_message #: aiogram.client.bot.Bot.create_chat_invite_link #: aiogram.client.bot.Bot.create_forum_topic #: aiogram.client.bot.Bot.create_invoice_link @@ -76,6 +77,7 @@ msgstr "" #: aiogram.client.bot.Bot.download_file #: aiogram.client.bot.Bot.edit_chat_invite_link #: aiogram.client.bot.Bot.edit_forum_topic +#: aiogram.client.bot.Bot.edit_general_forum_topic #: aiogram.client.bot.Bot.edit_message_caption #: aiogram.client.bot.Bot.edit_message_live_location #: aiogram.client.bot.Bot.edit_message_media @@ -95,10 +97,13 @@ msgstr "" #: aiogram.client.bot.Bot.get_my_default_administrator_rights #: aiogram.client.bot.Bot.get_sticker_set aiogram.client.bot.Bot.get_updates #: aiogram.client.bot.Bot.get_user_profile_photos -#: aiogram.client.bot.Bot.get_webhook_info aiogram.client.bot.Bot.leave_chat -#: aiogram.client.bot.Bot.log_out aiogram.client.bot.Bot.pin_chat_message +#: aiogram.client.bot.Bot.get_webhook_info +#: aiogram.client.bot.Bot.hide_general_forum_topic +#: aiogram.client.bot.Bot.leave_chat aiogram.client.bot.Bot.log_out +#: aiogram.client.bot.Bot.pin_chat_message #: aiogram.client.bot.Bot.promote_chat_member #: aiogram.client.bot.Bot.reopen_forum_topic +#: aiogram.client.bot.Bot.reopen_general_forum_topic #: aiogram.client.bot.Bot.restrict_chat_member #: aiogram.client.bot.Bot.revoke_chat_invite_link #: aiogram.client.bot.Bot.send_animation aiogram.client.bot.Bot.send_audio @@ -126,6 +131,7 @@ msgstr "" #: aiogram.client.bot.Bot.stop_message_live_location #: aiogram.client.bot.Bot.stop_poll aiogram.client.bot.Bot.unban_chat_member #: aiogram.client.bot.Bot.unban_chat_sender_chat +#: aiogram.client.bot.Bot.unhide_general_forum_topic #: aiogram.client.bot.Bot.unpin_all_chat_messages #: aiogram.client.bot.Bot.unpin_all_forum_topic_messages #: aiogram.client.bot.Bot.unpin_chat_message @@ -133,17 +139,17 @@ msgstr "" msgid "Parameters" msgstr "" -#: aiogram.client.bot.Bot.__init__:1 of +#: aiogram.client.bot.Bot.__init__:3 of msgid "Telegram Bot token `Obtained from @BotFather `_" msgstr "" -#: aiogram.client.bot.Bot.__init__:2 of +#: aiogram.client.bot.Bot.__init__:4 of msgid "" "HTTP Client session (For example AiohttpSession). If not specified it " "will be automatically created." msgstr "" -#: aiogram.client.bot.Bot.__init__:4 of +#: aiogram.client.bot.Bot.__init__:6 of msgid "" "Default parse mode. If specified it will be propagated into the API " "methods at runtime." @@ -153,7 +159,7 @@ msgstr "" msgid "Raises" msgstr "" -#: aiogram.client.bot.Bot.__init__:6 of +#: aiogram.client.bot.Bot.__init__:8 of msgid "When token has invalid format this exception will be raised" msgstr "" @@ -170,8 +176,9 @@ msgstr "" #: aiogram.client.bot.Bot.approve_chat_join_request #: aiogram.client.bot.Bot.ban_chat_member #: aiogram.client.bot.Bot.ban_chat_sender_chat aiogram.client.bot.Bot.close -#: aiogram.client.bot.Bot.close_forum_topic aiogram.client.bot.Bot.context -#: aiogram.client.bot.Bot.copy_message +#: aiogram.client.bot.Bot.close_forum_topic +#: aiogram.client.bot.Bot.close_general_forum_topic +#: aiogram.client.bot.Bot.context aiogram.client.bot.Bot.copy_message #: aiogram.client.bot.Bot.create_chat_invite_link #: aiogram.client.bot.Bot.create_forum_topic #: aiogram.client.bot.Bot.create_invoice_link @@ -186,6 +193,7 @@ msgstr "" #: aiogram.client.bot.Bot.delete_webhook #: aiogram.client.bot.Bot.edit_chat_invite_link #: aiogram.client.bot.Bot.edit_forum_topic +#: aiogram.client.bot.Bot.edit_general_forum_topic #: aiogram.client.bot.Bot.edit_message_caption #: aiogram.client.bot.Bot.edit_message_live_location #: aiogram.client.bot.Bot.edit_message_media @@ -205,11 +213,13 @@ msgstr "" #: aiogram.client.bot.Bot.get_my_default_administrator_rights #: aiogram.client.bot.Bot.get_sticker_set aiogram.client.bot.Bot.get_updates #: aiogram.client.bot.Bot.get_user_profile_photos -#: aiogram.client.bot.Bot.get_webhook_info aiogram.client.bot.Bot.id +#: aiogram.client.bot.Bot.get_webhook_info +#: aiogram.client.bot.Bot.hide_general_forum_topic aiogram.client.bot.Bot.id #: aiogram.client.bot.Bot.leave_chat aiogram.client.bot.Bot.log_out -#: aiogram.client.bot.Bot.pin_chat_message +#: aiogram.client.bot.Bot.me aiogram.client.bot.Bot.pin_chat_message #: aiogram.client.bot.Bot.promote_chat_member #: aiogram.client.bot.Bot.reopen_forum_topic +#: aiogram.client.bot.Bot.reopen_general_forum_topic #: aiogram.client.bot.Bot.restrict_chat_member #: aiogram.client.bot.Bot.revoke_chat_invite_link #: aiogram.client.bot.Bot.send_animation aiogram.client.bot.Bot.send_audio @@ -237,6 +247,7 @@ msgstr "" #: aiogram.client.bot.Bot.stop_message_live_location #: aiogram.client.bot.Bot.stop_poll aiogram.client.bot.Bot.unban_chat_member #: aiogram.client.bot.Bot.unban_chat_sender_chat +#: aiogram.client.bot.Bot.unhide_general_forum_topic #: aiogram.client.bot.Bot.unpin_all_chat_messages #: aiogram.client.bot.Bot.unpin_all_forum_topic_messages #: aiogram.client.bot.Bot.unpin_chat_message @@ -248,6 +259,10 @@ msgstr "" msgid "Generate bot context" msgstr "" +#: aiogram.client.bot.Bot.me:1 of +msgid "Cached alias for getMe method" +msgstr "" + #: aiogram.client.bot.Bot.download_file:1 of msgid "Download file by file_path to destination." msgstr "" @@ -367,6 +382,7 @@ msgstr "" #: aiogram.client.bot.Bot.ban_chat_member:7 #: aiogram.client.bot.Bot.ban_chat_sender_chat:5 aiogram.client.bot.Bot.close:3 #: aiogram.client.bot.Bot.close_forum_topic:5 +#: aiogram.client.bot.Bot.close_general_forum_topic:4 #: aiogram.client.bot.Bot.copy_message:15 #: aiogram.client.bot.Bot.create_chat_invite_link:8 #: aiogram.client.bot.Bot.create_forum_topic:7 @@ -382,6 +398,7 @@ msgstr "" #: aiogram.client.bot.Bot.delete_webhook:4 #: aiogram.client.bot.Bot.edit_chat_invite_link:9 #: aiogram.client.bot.Bot.edit_forum_topic:7 +#: aiogram.client.bot.Bot.edit_general_forum_topic:5 #: aiogram.client.bot.Bot.edit_message_caption:10 #: aiogram.client.bot.Bot.edit_message_live_location:12 #: aiogram.client.bot.Bot.edit_message_media:8 @@ -403,23 +420,25 @@ msgstr "" #: aiogram.client.bot.Bot.get_updates:13 #: aiogram.client.bot.Bot.get_user_profile_photos:6 #: aiogram.client.bot.Bot.get_webhook_info:3 +#: aiogram.client.bot.Bot.hide_general_forum_topic:4 #: aiogram.client.bot.Bot.leave_chat:4 aiogram.client.bot.Bot.log_out:3 #: aiogram.client.bot.Bot.pin_chat_message:6 #: aiogram.client.bot.Bot.promote_chat_member:17 #: aiogram.client.bot.Bot.reopen_forum_topic:5 +#: aiogram.client.bot.Bot.reopen_general_forum_topic:4 #: aiogram.client.bot.Bot.restrict_chat_member:7 #: aiogram.client.bot.Bot.revoke_chat_invite_link:5 -#: aiogram.client.bot.Bot.send_animation:18 +#: aiogram.client.bot.Bot.send_animation:19 #: aiogram.client.bot.Bot.send_audio:19 -#: aiogram.client.bot.Bot.send_chat_action:9 +#: aiogram.client.bot.Bot.send_chat_action:10 #: aiogram.client.bot.Bot.send_contact:14 aiogram.client.bot.Bot.send_dice:11 #: aiogram.client.bot.Bot.send_document:16 aiogram.client.bot.Bot.send_game:11 #: aiogram.client.bot.Bot.send_invoice:31 #: aiogram.client.bot.Bot.send_location:16 #: aiogram.client.bot.Bot.send_media_group:10 -#: aiogram.client.bot.Bot.send_message:14 aiogram.client.bot.Bot.send_photo:14 +#: aiogram.client.bot.Bot.send_message:14 aiogram.client.bot.Bot.send_photo:15 #: aiogram.client.bot.Bot.send_poll:22 aiogram.client.bot.Bot.send_sticker:11 -#: aiogram.client.bot.Bot.send_venue:18 aiogram.client.bot.Bot.send_video:19 +#: aiogram.client.bot.Bot.send_venue:18 aiogram.client.bot.Bot.send_video:20 #: aiogram.client.bot.Bot.send_video_note:14 #: aiogram.client.bot.Bot.send_voice:15 #: aiogram.client.bot.Bot.set_chat_administrator_custom_title:6 @@ -440,6 +459,7 @@ msgstr "" #: aiogram.client.bot.Bot.stop_poll:6 #: aiogram.client.bot.Bot.unban_chat_member:6 #: aiogram.client.bot.Bot.unban_chat_sender_chat:5 +#: aiogram.client.bot.Bot.unhide_general_forum_topic:4 #: aiogram.client.bot.Bot.unpin_all_chat_messages:4 #: aiogram.client.bot.Bot.unpin_all_forum_topic_messages:5 #: aiogram.client.bot.Bot.unpin_chat_message:5 @@ -452,6 +472,7 @@ msgstr "" #: aiogram.client.bot.Bot.ban_chat_member:8 #: aiogram.client.bot.Bot.ban_chat_sender_chat:6 #: aiogram.client.bot.Bot.close_forum_topic:6 +#: aiogram.client.bot.Bot.close_general_forum_topic:5 #: aiogram.client.bot.Bot.create_new_sticker_set:13 #: aiogram.client.bot.Bot.decline_chat_join_request:6 #: aiogram.client.bot.Bot.delete_chat_photo:5 @@ -462,10 +483,13 @@ msgstr "" #: aiogram.client.bot.Bot.delete_sticker_from_set:5 #: aiogram.client.bot.Bot.delete_webhook:5 #: aiogram.client.bot.Bot.edit_forum_topic:8 +#: aiogram.client.bot.Bot.edit_general_forum_topic:6 +#: aiogram.client.bot.Bot.hide_general_forum_topic:5 #: aiogram.client.bot.Bot.leave_chat:5 #: aiogram.client.bot.Bot.pin_chat_message:7 #: aiogram.client.bot.Bot.promote_chat_member:18 #: aiogram.client.bot.Bot.reopen_forum_topic:6 +#: aiogram.client.bot.Bot.reopen_general_forum_topic:5 #: aiogram.client.bot.Bot.restrict_chat_member:8 #: aiogram.client.bot.Bot.set_chat_administrator_custom_title:7 #: aiogram.client.bot.Bot.set_chat_description:6 @@ -480,6 +504,7 @@ msgstr "" #: aiogram.client.bot.Bot.set_sticker_set_thumb:7 #: aiogram.client.bot.Bot.unban_chat_member:7 #: aiogram.client.bot.Bot.unban_chat_sender_chat:6 +#: aiogram.client.bot.Bot.unhide_general_forum_topic:5 #: aiogram.client.bot.Bot.unpin_all_chat_messages:5 #: aiogram.client.bot.Bot.unpin_all_forum_topic_messages:6 #: aiogram.client.bot.Bot.unpin_chat_message:6 of @@ -812,15 +837,20 @@ msgid "" msgstr "" #: aiogram.client.bot.Bot.close_forum_topic:3 +#: aiogram.client.bot.Bot.close_general_forum_topic:3 #: aiogram.client.bot.Bot.create_forum_topic:3 #: aiogram.client.bot.Bot.delete_chat_sticker_set:3 #: aiogram.client.bot.Bot.delete_forum_topic:3 #: aiogram.client.bot.Bot.edit_forum_topic:3 +#: aiogram.client.bot.Bot.edit_general_forum_topic:3 +#: aiogram.client.bot.Bot.hide_general_forum_topic:3 #: aiogram.client.bot.Bot.reopen_forum_topic:3 +#: aiogram.client.bot.Bot.reopen_general_forum_topic:3 #: aiogram.client.bot.Bot.restrict_chat_member:3 #: aiogram.client.bot.Bot.set_chat_administrator_custom_title:3 #: aiogram.client.bot.Bot.set_chat_permissions:3 #: aiogram.client.bot.Bot.set_chat_sticker_set:3 +#: aiogram.client.bot.Bot.unhide_general_forum_topic:3 #: aiogram.client.bot.Bot.unpin_all_forum_topic_messages:3 of msgid "" "Unique identifier for the target chat or username of the target " @@ -898,14 +928,14 @@ msgstr "" #: aiogram.client.bot.Bot.copy_message:10 #: aiogram.client.bot.Bot.forward_message:7 -#: aiogram.client.bot.Bot.send_animation:13 +#: aiogram.client.bot.Bot.send_animation:14 #: aiogram.client.bot.Bot.send_audio:14 aiogram.client.bot.Bot.send_contact:9 #: aiogram.client.bot.Bot.send_dice:6 aiogram.client.bot.Bot.send_document:11 #: aiogram.client.bot.Bot.send_game:6 aiogram.client.bot.Bot.send_invoice:26 #: aiogram.client.bot.Bot.send_location:11 -#: aiogram.client.bot.Bot.send_message:9 aiogram.client.bot.Bot.send_photo:9 +#: aiogram.client.bot.Bot.send_message:9 aiogram.client.bot.Bot.send_photo:10 #: aiogram.client.bot.Bot.send_poll:17 aiogram.client.bot.Bot.send_sticker:6 -#: aiogram.client.bot.Bot.send_venue:13 aiogram.client.bot.Bot.send_video:14 +#: aiogram.client.bot.Bot.send_venue:13 aiogram.client.bot.Bot.send_video:15 #: aiogram.client.bot.Bot.send_video_note:9 #: aiogram.client.bot.Bot.send_voice:10 of msgid "" @@ -914,43 +944,43 @@ msgid "" msgstr "" #: aiogram.client.bot.Bot.copy_message:11 -#: aiogram.client.bot.Bot.send_animation:14 +#: aiogram.client.bot.Bot.send_animation:15 #: aiogram.client.bot.Bot.send_audio:15 aiogram.client.bot.Bot.send_contact:10 #: aiogram.client.bot.Bot.send_document:12 aiogram.client.bot.Bot.send_game:7 #: aiogram.client.bot.Bot.send_invoice:27 #: aiogram.client.bot.Bot.send_location:12 -#: aiogram.client.bot.Bot.send_message:10 aiogram.client.bot.Bot.send_photo:10 +#: aiogram.client.bot.Bot.send_message:10 aiogram.client.bot.Bot.send_photo:11 #: aiogram.client.bot.Bot.send_poll:18 aiogram.client.bot.Bot.send_sticker:7 -#: aiogram.client.bot.Bot.send_venue:14 aiogram.client.bot.Bot.send_video:15 +#: aiogram.client.bot.Bot.send_venue:14 aiogram.client.bot.Bot.send_video:16 #: aiogram.client.bot.Bot.send_video_note:10 #: aiogram.client.bot.Bot.send_voice:11 of msgid "Protects the contents of the sent message from forwarding and saving" msgstr "" #: aiogram.client.bot.Bot.copy_message:12 -#: aiogram.client.bot.Bot.send_animation:15 +#: aiogram.client.bot.Bot.send_animation:16 #: aiogram.client.bot.Bot.send_audio:16 aiogram.client.bot.Bot.send_contact:11 #: aiogram.client.bot.Bot.send_dice:8 aiogram.client.bot.Bot.send_document:13 #: aiogram.client.bot.Bot.send_game:8 aiogram.client.bot.Bot.send_invoice:28 #: aiogram.client.bot.Bot.send_location:13 -#: aiogram.client.bot.Bot.send_message:11 aiogram.client.bot.Bot.send_photo:11 +#: aiogram.client.bot.Bot.send_message:11 aiogram.client.bot.Bot.send_photo:12 #: aiogram.client.bot.Bot.send_poll:19 aiogram.client.bot.Bot.send_sticker:8 -#: aiogram.client.bot.Bot.send_venue:15 aiogram.client.bot.Bot.send_video:16 +#: aiogram.client.bot.Bot.send_venue:15 aiogram.client.bot.Bot.send_video:17 #: aiogram.client.bot.Bot.send_video_note:11 #: aiogram.client.bot.Bot.send_voice:12 of msgid "If the message is a reply, ID of the original message" msgstr "" #: aiogram.client.bot.Bot.copy_message:13 -#: aiogram.client.bot.Bot.send_animation:16 +#: aiogram.client.bot.Bot.send_animation:17 #: aiogram.client.bot.Bot.send_audio:17 aiogram.client.bot.Bot.send_contact:12 #: aiogram.client.bot.Bot.send_dice:9 aiogram.client.bot.Bot.send_document:14 #: aiogram.client.bot.Bot.send_game:9 aiogram.client.bot.Bot.send_invoice:29 #: aiogram.client.bot.Bot.send_location:14 #: aiogram.client.bot.Bot.send_media_group:9 -#: aiogram.client.bot.Bot.send_message:12 aiogram.client.bot.Bot.send_photo:12 +#: aiogram.client.bot.Bot.send_message:12 aiogram.client.bot.Bot.send_photo:13 #: aiogram.client.bot.Bot.send_poll:20 aiogram.client.bot.Bot.send_sticker:9 -#: aiogram.client.bot.Bot.send_venue:16 aiogram.client.bot.Bot.send_video:17 +#: aiogram.client.bot.Bot.send_venue:16 aiogram.client.bot.Bot.send_video:18 #: aiogram.client.bot.Bot.send_video_note:12 #: aiogram.client.bot.Bot.send_voice:13 of msgid "" @@ -959,13 +989,13 @@ msgid "" msgstr "" #: aiogram.client.bot.Bot.copy_message:14 -#: aiogram.client.bot.Bot.send_animation:17 +#: aiogram.client.bot.Bot.send_animation:18 #: aiogram.client.bot.Bot.send_audio:18 aiogram.client.bot.Bot.send_contact:13 #: aiogram.client.bot.Bot.send_dice:10 aiogram.client.bot.Bot.send_document:15 #: aiogram.client.bot.Bot.send_location:15 -#: aiogram.client.bot.Bot.send_message:13 aiogram.client.bot.Bot.send_photo:13 +#: aiogram.client.bot.Bot.send_message:13 aiogram.client.bot.Bot.send_photo:14 #: aiogram.client.bot.Bot.send_poll:21 aiogram.client.bot.Bot.send_sticker:10 -#: aiogram.client.bot.Bot.send_venue:17 aiogram.client.bot.Bot.send_video:18 +#: aiogram.client.bot.Bot.send_venue:17 aiogram.client.bot.Bot.send_video:19 #: aiogram.client.bot.Bot.send_video_note:13 #: aiogram.client.bot.Bot.send_voice:14 of msgid "" @@ -1391,14 +1421,17 @@ msgid "" msgstr "" #: aiogram.client.bot.Bot.edit_forum_topic:5 of -msgid "New topic name, 1-128 characters" +msgid "" +"New topic name, 0-128 characters. If not specififed or empty, the current" +" name of the topic will be kept" msgstr "" #: aiogram.client.bot.Bot.edit_forum_topic:6 of msgid "" "New unique identifier of the custom emoji shown as the topic icon. Use " ":class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers`" -" to get all allowed custom emoji identifiers." +" to get all allowed custom emoji identifiers. Pass an empty string to " +"remove the icon. If not specified, the current icon will be kept" msgstr "" #: aiogram.client.bot.Bot.edit_message_caption:1 of @@ -1629,7 +1662,7 @@ msgstr "" #: aiogram.client.bot.Bot.send_contact:15 aiogram.client.bot.Bot.send_dice:12 #: aiogram.client.bot.Bot.send_game:12 aiogram.client.bot.Bot.send_invoice:32 #: aiogram.client.bot.Bot.send_location:17 -#: aiogram.client.bot.Bot.send_message:15 aiogram.client.bot.Bot.send_photo:15 +#: aiogram.client.bot.Bot.send_message:15 aiogram.client.bot.Bot.send_photo:16 #: aiogram.client.bot.Bot.send_poll:23 aiogram.client.bot.Bot.send_sticker:12 #: aiogram.client.bot.Bot.send_venue:19 #: aiogram.client.bot.Bot.send_video_note:15 of @@ -1671,8 +1704,10 @@ msgstr "" #: aiogram.client.bot.Bot.get_chat_member:1 of msgid "" -"Use this method to get information about a member of a chat. Returns a " -":class:`aiogram.types.chat_member.ChatMember` object on success." +"Use this method to get information about a member of a chat. The method " +"is guaranteed to work only if the bot is an administrator in the chat. " +"Returns a :class:`aiogram.types.chat_member.ChatMember` object on " +"success." msgstr "" #: aiogram.client.bot.Bot.get_chat_member:6 of @@ -2186,7 +2221,13 @@ msgid "" "more details." msgstr "" -#: aiogram.client.bot.Bot.send_animation:19 of +#: aiogram.client.bot.Bot.send_animation:13 of +msgid "" +"Pass :code:`True` if the animation needs to be covered with a spoiler " +"animation" +msgstr "" + +#: aiogram.client.bot.Bot.send_animation:20 of msgid "" "Bots can currently send animation files of up to 50 MB in size, this " "limit may be changed in the future." @@ -2281,7 +2322,11 @@ msgid "" "`_." msgstr "" -#: aiogram.client.bot.Bot.send_chat_action:10 of +#: aiogram.client.bot.Bot.send_chat_action:9 of +msgid "Unique identifier for the target message thread; supergroups only" +msgstr "" + +#: aiogram.client.bot.Bot.send_chat_action:11 of msgid "The user will see a 'sending photo' status for the bot." msgstr "" @@ -2548,6 +2593,12 @@ msgid "" "details." msgstr "" +#: aiogram.client.bot.Bot.send_photo:9 of +msgid "" +"Pass :code:`True` if the photo needs to be covered with a spoiler " +"animation" +msgstr "" + #: aiogram.client.bot.Bot.send_poll:1 of msgid "" "Use this method to send a native poll. On success, the sent " @@ -2730,10 +2781,16 @@ msgid "" msgstr "" #: aiogram.client.bot.Bot.send_video:13 of +msgid "" +"Pass :code:`True` if the video needs to be covered with a spoiler " +"animation" +msgstr "" + +#: aiogram.client.bot.Bot.send_video:14 of msgid "Pass :code:`True` if the uploaded video is suitable for streaming" msgstr "" -#: aiogram.client.bot.Bot.send_video:20 of +#: aiogram.client.bot.Bot.send_video:21 of msgid "" "Bots can currently send video files of up to 50 MB in size, this limit " "may be changed in the future." @@ -3227,6 +3284,51 @@ msgstr "" msgid "Returns the uploaded :class:`aiogram.types.file.File` on success." msgstr "" +#: aiogram.client.bot.Bot.close_general_forum_topic:1 of +msgid "" +"Use this method to close an open 'General' topic in a forum supergroup " +"chat. The bot must be an administrator in the chat for this to work and " +"must have the *can_manage_topics* administrator rights. Returns " +":code:`True` on success." +msgstr "" + +#: aiogram.client.bot.Bot.edit_general_forum_topic:1 of +msgid "" +"Use this method to edit the name of the 'General' topic in a forum " +"supergroup chat. The bot must be an administrator in the chat for this to" +" work and must have *can_manage_topics* administrator rights. Returns " +":code:`True` on success." +msgstr "" + +#: aiogram.client.bot.Bot.edit_general_forum_topic:4 of +msgid "New topic name, 1-128 characters" +msgstr "" + +#: aiogram.client.bot.Bot.hide_general_forum_topic:1 of +msgid "" +"Use this method to hide the 'General' topic in a forum supergroup chat. " +"The bot must be an administrator in the chat for this to work and must " +"have the *can_manage_topics* administrator rights. The topic will be " +"automatically closed if it was open. Returns :code:`True` on success." +msgstr "" + +#: aiogram.client.bot.Bot.reopen_general_forum_topic:1 of +msgid "" +"Use this method to reopen a closed 'General' topic in a forum supergroup " +"chat. The bot must be an administrator in the chat for this to work and " +"must have the *can_manage_topics* administrator rights. The topic will be" +" automatically unhidden if it was hidden. Returns :code:`True` on " +"success." +msgstr "" + +#: aiogram.client.bot.Bot.unhide_general_forum_topic:1 of +msgid "" +"Use this method to unhide the 'General' topic in a forum supergroup chat." +" The bot must be an administrator in the chat for this to work and must " +"have the *can_manage_topics* administrator rights. Returns :code:`True` " +"on success." +msgstr "" + #~ msgid "" #~ "Additional interface options. A JSON-" #~ "serialized object for an `inline " @@ -3800,3 +3902,19 @@ msgstr "" #~ "users if the user and their " #~ "neighbors are not among them." #~ msgstr "" + +#~ msgid "" +#~ "New unique identifier of the custom " +#~ "emoji shown as the topic icon. Use" +#~ " " +#~ ":class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers`" +#~ " to get all allowed custom emoji " +#~ "identifiers." +#~ msgstr "" + +#~ msgid "" +#~ "Use this method to get information " +#~ "about a member of a chat. Returns" +#~ " a :class:`aiogram.types.chat_member.ChatMember` object" +#~ " on success." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/download_file.po b/docs/locale/uk_UA/LC_MESSAGES/api/download_file.po index 70760335..11675c94 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/download_file.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/download_file.po @@ -5,9 +5,9 @@ # msgid "" msgstr "" -"Project-Id-Version: aiogram\n" +"Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: 2022-12-13 23:33+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -15,7 +15,6 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -"X-Generator: Poedit 3.2.2\n" #: ../../api/download_file.rst:3 msgid "How to download file?" @@ -28,12 +27,12 @@ msgstr "ะ—ะฐะฒะฐะฝั‚ะฐะถะตะฝะฝั ั„ะฐะนะปะฐ ะฒั€ัƒั‡ะฝัƒ" #: ../../api/download_file.rst:8 msgid "" "First, you must get the `file_id` of the file you want to download. " -"Information about files sent to the bot is contained in `Message `__." +"Information about files sent to the bot is contained in `Message " +"`__." msgstr "" -"ะŸะพ-ะฟะตั€ัˆะต, ะฒะธ ะฟะพะฒะธะฝะฝั– ะพั‚ั€ะธะผะฐั‚ะธ `file_id` ั„ะฐะนะปัƒ, ัะบะธะน ะฒะธ ั…ะพั‡ะตั‚ะต ะทะฐะฒะฐะฝั‚ะฐะถะธั‚ะธ. " -"ะ†ะฝั„ะพั€ะผะฐั†ั–ั ะฟั€ะพ ั„ะฐะนะปะธ, ะฝะฐะดั–ัะปะฐะฝั– ะฑะพั‚ัƒ, ะผั–ัั‚ะธั‚ัŒัั ะฒ `Message `__." +"ะŸะพ-ะฟะตั€ัˆะต, ะฒะธ ะฟะพะฒะธะฝะฝั– ะพั‚ั€ะธะผะฐั‚ะธ `file_id` ั„ะฐะนะปัƒ, ัะบะธะน ะฒะธ ั…ะพั‡ะตั‚ะต " +"ะทะฐะฒะฐะฝั‚ะฐะถะธั‚ะธ. ะ†ะฝั„ะพั€ะผะฐั†ั–ั ะฟั€ะพ ั„ะฐะนะปะธ, ะฝะฐะดั–ัะปะฐะฝั– ะฑะพั‚ัƒ, ะผั–ัั‚ะธั‚ัŒัั ะฒ `Message " +"`__." #: ../../api/download_file.rst:11 msgid "For example, download the document that came to the bot." @@ -41,15 +40,16 @@ msgstr "ะะฐะฟั€ะธะบะปะฐะด, ะทะฐะฒะฐะฝั‚ะฐะถั‚ะต ะดะพะบัƒะผะตะฝั‚, ัะบะธะน ะฟั€ #: ../../api/download_file.rst:17 msgid "" -"Then use the `getFile `__ method to get `file_path`." +"Then use the `getFile `__ method to get " +"`file_path`." msgstr "" "ะŸะพั‚ั–ะผ ัะบะพั€ะธัั‚ะฐะนั‚ะตัั ะผะตั‚ะพะดะพะผ `getFile `__, ั‰ะพะฑ " "ะพั‚ั€ะธะผะฐั‚ะธ `file_path`." #: ../../api/download_file.rst:24 msgid "" -"After that, use the `download_file <#download-file>`__ method from the bot " -"object." +"After that, use the `download_file <#download-file>`__ method from the " +"bot object." msgstr "" "ะŸั–ัะปั ั†ัŒะพะณะพ ัะบะพั€ะธัั‚ะฐะนั‚ะตัั ะผะตั‚ะพะดะพะผ `download_file <#download-file>`__ ะท " "ะพะฑโ€™ั”ะบั‚ะฐ ะฑะพั‚ะฐ." @@ -68,12 +68,8 @@ msgid "" "default value of destination and handle result of this method." msgstr "" "ะฏะบั‰ะพ ะฒะธ ั…ะพั‡ะตั‚ะต ะฐะฒั‚ะพะผะฐั‚ะธั‡ะฝะพ ัั‚ะฒะพั€ะธั‚ะธ ะผั–ัั†ะต ะฟั€ะธะทะฝะฐั‡ะตะฝะฝั (io.BytesIO), " -"ะฒะธะบะพั€ะธัั‚ะพะฒัƒะนั‚ะต ะทะฝะฐั‡ะตะฝะฝั ะฟั€ะธะทะฝะฐั‡ะตะฝะฝั ะทะฐ ะทะฐะผะพะฒั‡ัƒะฒะฐะฝะฝัะผ ั– ะพะฑั€ะพะฑั–ั‚ัŒ ั€ะตะทัƒะปัŒั‚ะฐั‚ " -"ั†ัŒะพะณะพ ะผะตั‚ะพะดัƒ." - -#: aiogram.client.bot.Bot:1 of -msgid "Bot class" -msgstr "Bot class" +"ะฒะธะบะพั€ะธัั‚ะพะฒัƒะนั‚ะต ะทะฝะฐั‡ะตะฝะฝั ะฟั€ะธะทะฝะฐั‡ะตะฝะฝั ะทะฐ ะทะฐะผะพะฒั‡ัƒะฒะฐะฝะฝัะผ ั– ะพะฑั€ะพะฑั–ั‚ัŒ ั€ะตะทัƒะปัŒั‚ะฐั‚" +" ั†ัŒะพะณะพ ะผะตั‚ะพะดัƒ." #: aiogram.client.bot.Bot.download_file:1 of msgid "Download file by file_path to destination." @@ -81,12 +77,12 @@ msgstr "ะ—ะฐะฒะฐะฝั‚ะฐะถัƒั” ั„ะฐะนะป ะท file_path ัƒ ะฒะบะฐะทะฐะฝะต ะผั–ัั†ะต. #: aiogram.client.bot.Bot.download:3 aiogram.client.bot.Bot.download_file:3 of msgid "" -"If you want to automatically create destination (:class:`io.BytesIO`) use " -"default value of destination and handle result of this method." +"If you want to automatically create destination (:class:`io.BytesIO`) use" +" default value of destination and handle result of this method." msgstr "" "ะฏะบั‰ะพ ะฒะธ ั…ะพั‡ะตั‚ะต ะฐะฒั‚ะพะผะฐั‚ะธั‡ะฝะพ ัั‚ะฒะพั€ะธั‚ะธ ะผั–ัั†ะต ะฟั€ะธะทะฝะฐั‡ะตะฝะฝั (io.BytesIO), " -"ะฒะธะบะพั€ะธัั‚ะพะฒัƒะนั‚ะต ะทะฝะฐั‡ะตะฝะฝั ะฟั€ะธะทะฝะฐั‡ะตะฝะฝั ะทะฐ ะทะฐะผะพะฒั‡ัƒะฒะฐะฝะฝัะผ ั– ะพะฑั€ะพะฑั–ั‚ัŒ ั€ะตะทัƒะปัŒั‚ะฐั‚ " -"ั†ัŒะพะณะพ ะผะตั‚ะพะดัƒ." +"ะฒะธะบะพั€ะธัั‚ะพะฒัƒะนั‚ะต ะทะฝะฐั‡ะตะฝะฝั ะฟั€ะธะทะฝะฐั‡ะตะฝะฝั ะทะฐ ะทะฐะผะพะฒั‡ัƒะฒะฐะฝะฝัะผ ั– ะพะฑั€ะพะฑั–ั‚ัŒ ั€ะตะทัƒะปัŒั‚ะฐั‚" +" ั†ัŒะพะณะพ ะผะตั‚ะพะดัƒ." #: aiogram.client.bot.Bot.download aiogram.client.bot.Bot.download_file of msgid "Parameters" @@ -94,18 +90,19 @@ msgstr "ะŸะฐั€ะฐะผะตั‚ั€ะธ" #: aiogram.client.bot.Bot.download_file:6 of msgid "" -"File path on Telegram server (You can get it from :obj:`aiogram.types.File`)" +"File path on Telegram server (You can get it from " +":obj:`aiogram.types.File`)" msgstr "" -"ะจะปัั… ะดะพ ั„ะฐะนะปัƒ ะฝะฐ ัะตั€ะฒะตั€ั– Telegram (ะ’ะธ ะผะพะถะตั‚ะต ะพั‚ั€ะธะผะฐั‚ะธ ะนะพะณะพ ะท :obj:`aiogram." -"types.File`)" +"ะจะปัั… ะดะพ ั„ะฐะนะปัƒ ะฝะฐ ัะตั€ะฒะตั€ั– Telegram (ะ’ะธ ะผะพะถะตั‚ะต ะพั‚ั€ะธะผะฐั‚ะธ ะนะพะณะพ ะท " +":obj:`aiogram.types.File`)" #: aiogram.client.bot.Bot.download:7 aiogram.client.bot.Bot.download_file:7 of msgid "" -"Filename, file path or instance of :class:`io.IOBase`. For e.g. :class:`io." -"BytesIO`, defaults to None" +"Filename, file path or instance of :class:`io.IOBase`. For e.g. " +":class:`io.BytesIO`, defaults to None" msgstr "" -"ะ†ะผโ€™ั ั„ะฐะนะปัƒ, ัˆะปัั… ะดะพ ั„ะฐะนะปัƒ ะฐะฑะพ ะตะบะทะตะผะฟะปัั€ :class:`io.IOBase`. ะ”ะปั ะฝะฐะฟั€. :" -"class:`io.BytesIO`, ะทะฐ ะทะฐะผะพะฒั‡ัƒะฒะฐะฝะฝัะผ ะฝะตะผะฐั”" +"ะ†ะผโ€™ั ั„ะฐะนะปัƒ, ัˆะปัั… ะดะพ ั„ะฐะนะปัƒ ะฐะฑะพ ะตะบะทะตะผะฟะปัั€ :class:`io.IOBase`. ะ”ะปั ะฝะฐะฟั€. " +":class:`io.BytesIO`, ะทะฐ ะทะฐะผะพะฒั‡ัƒะฒะฐะฝะฝัะผ ะฝะตะผะฐั”" #: aiogram.client.bot.Bot.download:8 aiogram.client.bot.Bot.download_file:8 of msgid "Total timeout in seconds, defaults to 30" @@ -118,11 +115,11 @@ msgstr "ะ ะพะทะผั–ั€ ั„ั€ะฐะณะผะตะฝั‚ั–ะฒ ั„ะฐะนะปัƒ, ะทะฐ ะทะฐะผะพะฒั‡ัƒะฒะฐะฝ #: aiogram.client.bot.Bot.download:10 aiogram.client.bot.Bot.download_file:10 #: of msgid "" -"Go to start of file when downloading is finished. Used only for destination " -"with :class:`typing.BinaryIO` type, defaults to True" +"Go to start of file when downloading is finished. Used only for " +"destination with :class:`typing.BinaryIO` type, defaults to True" msgstr "" -"ะŸะตั€ะตะนั‚ะธ ะดะพ ะฟะพั‡ะฐั‚ะบัƒ ั„ะฐะนะปัƒ, ะบะพะปะธ ะทะฐะฒะฐะฝั‚ะฐะถะตะฝะฝั ะทะฐะฒะตั€ัˆะธั‚ัŒัั. ะ’ะธะบะพั€ะธัั‚ะพะฒัƒั”ั‚ัŒัั " -"ะปะธัˆะต ะดะปั ะฟั€ะธะทะฝะฐั‡ะตะฝะฝั ะท ั‚ะธะฟะพะผ :class:`typing.BinaryIO`, ะทะฐ ะทะฐะผะพะฒั‡ัƒะฒะฐะฝะฝัะผ " +"ะŸะตั€ะตะนั‚ะธ ะดะพ ะฟะพั‡ะฐั‚ะบัƒ ั„ะฐะนะปัƒ, ะบะพะปะธ ะทะฐะฒะฐะฝั‚ะฐะถะตะฝะฝั ะทะฐะฒะตั€ัˆะธั‚ัŒัั. ะ’ะธะบะพั€ะธัั‚ะพะฒัƒั”ั‚ัŒัั" +" ะปะธัˆะต ะดะปั ะฟั€ะธะทะฝะฐั‡ะตะฝะฝั ะท ั‚ะธะฟะพะผ :class:`typing.BinaryIO`, ะทะฐ ะทะฐะผะพะฒั‡ัƒะฒะฐะฝะฝัะผ " "ะทะฝะฐั‡ะตะฝะฝั True" #: ../../api/download_file.rst:38 @@ -139,11 +136,11 @@ msgstr "ะ—ะฐะฒะฐะฝั‚ะฐะถะตะฝะฝั ั„ะฐะนะปัƒ ะฝะฐ ะดะธัะบ" #: ../../api/download_file.rst:43 msgid "" -"To download file to disk, you must specify the file name or path where to " -"download the file. In this case, the function will return nothing." +"To download file to disk, you must specify the file name or path where to" +" download the file. In this case, the function will return nothing." msgstr "" -"ะฉะพะฑ ะทะฐะฒะฐะฝั‚ะฐะถะธั‚ะธ ั„ะฐะนะป ะฝะฐ ะดะธัะบ, ะฝะตะพะฑั…ั–ะดะฝะพ ะฒะบะฐะทะฐั‚ะธ ั–ะผ'ั ั„ะฐะนะปัƒ ะฐะฑะพ ัˆะปัั…, ะบัƒะดะธ " -"ะนะพะณะพ ะทะฐะฒะฐะฝั‚ะฐะถะธั‚ะธ. ะฃ ั†ัŒะพะผัƒ ะฒะธะฟะฐะดะบัƒ ั„ัƒะฝะบั†ั–ั ะฝั–ั‡ะพะณะพ ะฝะต ะฟะพะฒะตั€ะฝะต." +"ะฉะพะฑ ะทะฐะฒะฐะฝั‚ะฐะถะธั‚ะธ ั„ะฐะนะป ะฝะฐ ะดะธัะบ, ะฝะตะพะฑั…ั–ะดะฝะพ ะฒะบะฐะทะฐั‚ะธ ั–ะผ'ั ั„ะฐะนะปัƒ ะฐะฑะพ ัˆะปัั…, ะบัƒะดะธ" +" ะนะพะณะพ ะทะฐะฒะฐะฝั‚ะฐะถะธั‚ะธ. ะฃ ั†ัŒะพะผัƒ ะฒะธะฟะฐะดะบัƒ ั„ัƒะฝะบั†ั–ั ะฝั–ั‡ะพะณะพ ะฝะต ะฟะพะฒะตั€ะฝะต." #: ../../api/download_file.rst:51 msgid "Download file to binary I/O object" @@ -151,12 +148,12 @@ msgstr "ะ—ะฐะฒะฐะฝั‚ะฐะถะตะฝะฝั ั„ะฐะนะปัƒ ะฒ ะพะฟะตั€ะฐั‚ะธะฒะฝัƒ ะฟะฐะผ'ัั‚ #: ../../api/download_file.rst:53 msgid "" -"To download file to binary I/O object, you must specify an object with the :" -"obj:`typing.BinaryIO` type or use the default (:obj:`None`) value." +"To download file to binary I/O object, you must specify an object with " +"the :obj:`typing.BinaryIO` type or use the default (:obj:`None`) value." msgstr "" -"ะฉะพะฑ ะทะฐะฒะฐะฝั‚ะฐะถะธั‚ะธ ั„ะฐะนะป ะดะพ ะพะฟะตั€ะฐั‚ะธะฒะฝะพั— ะฟะฐะผ'ัั‚ั–, ะฒะธ ะฟะพะฒะธะฝะฝั– ะฒะบะฐะทะฐั‚ะธ ะพะฑโ€™ั”ะบั‚ ั–ะท " -"ั‚ะธะฟะพะผ :obj:`typing.BinaryIO` ะฐะฑะพ ะฒะธะบะพั€ะธัั‚ะฐั‚ะธ ะทะฝะฐั‡ะตะฝะฝั ะทะฐ ะทะฐะผะพะฒั‡ัƒะฒะฐะฝะฝัะผ (:" -"obj:`None`)." +"ะฉะพะฑ ะทะฐะฒะฐะฝั‚ะฐะถะธั‚ะธ ั„ะฐะนะป ะดะพ ะพะฟะตั€ะฐั‚ะธะฒะฝะพั— ะฟะฐะผ'ัั‚ั–, ะฒะธ ะฟะพะฒะธะฝะฝั– ะฒะบะฐะทะฐั‚ะธ ะพะฑโ€™ั”ะบั‚ ั–ะท" +" ั‚ะธะฟะพะผ :obj:`typing.BinaryIO` ะฐะฑะพ ะฒะธะบะพั€ะธัั‚ะฐั‚ะธ ะทะฝะฐั‡ะตะฝะฝั ะทะฐ ะทะฐะผะพะฒั‡ัƒะฒะฐะฝะฝัะผ " +"(:obj:`None`)." #: ../../api/download_file.rst:56 msgid "In the first case, the function will return your object:" @@ -164,11 +161,11 @@ msgstr "ะฃ ะฟะตั€ัˆะพะผัƒ ะฒะธะฟะฐะดะบัƒ ั„ัƒะฝะบั†ั–ั ะฟะพะฒะตั€ะฝะต ะฒะฐัˆ ะพ #: ../../api/download_file.rst:64 msgid "" -"If you leave the default value, an :obj:`io.BytesIO` object will be created " -"and returned." +"If you leave the default value, an :obj:`io.BytesIO` object will be " +"created and returned." msgstr "" -"ะฏะบั‰ะพ ะทะฐะปะธัˆะธั‚ะธ ะทะฝะฐั‡ะตะฝะฝั ะทะฐ ะทะฐะผะพะฒั‡ัƒะฒะฐะฝะฝัะผ, ะฑัƒะดะต ัั‚ะฒะพั€ะตะฝะพ ั‚ะฐ ะฟะพะฒะตั€ะฝะตะฝะพ ะพะฑโ€™ั”ะบั‚ :" -"obj:`io.BytesIO`." +"ะฏะบั‰ะพ ะทะฐะปะธัˆะธั‚ะธ ะทะฝะฐั‡ะตะฝะฝั ะทะฐ ะทะฐะผะพะฒั‡ัƒะฒะฐะฝะฝัะผ, ะฑัƒะดะต ัั‚ะฒะพั€ะตะฝะพ ั‚ะฐ ะฟะพะฒะตั€ะฝะตะฝะพ " +"ะพะฑโ€™ั”ะบั‚ :obj:`io.BytesIO`." #: ../../api/download_file.rst:72 msgid "Download file in short way" @@ -188,8 +185,7 @@ msgstr "download(...)" #: ../../api/download_file.rst:79 msgid "Download file by `file_id` or `Downloadable` object to destination." -msgstr "" -"ะ—ะฐะฒะฐะฝั‚ะฐะถัƒั” ั„ะฐะนะป ะทะฐ `file_id` ะฐะฑะพ `Downloadable` ะพะฑโ€™ั”ะบั‚ะพะผ ัƒ ะฒะบะฐะทะฐะฝะต ะผั–ัั†ะต." +msgstr "ะ—ะฐะฒะฐะฝั‚ะฐะถัƒั” ั„ะฐะนะป ะทะฐ `file_id` ะฐะฑะพ `Downloadable` ะพะฑโ€™ั”ะบั‚ะพะผ ัƒ ะฒะบะฐะทะฐะฝะต ะผั–ัั†ะต." #: aiogram.client.bot.Bot.download:1 of msgid "Download file by file_id or Downloadable object to destination." @@ -205,14 +201,15 @@ msgid "" "accepts `file_id` or an `Downloadable` object (object that contains the " "`file_id` attribute) instead of `file_path`." msgstr "" -"ะ’ั–ะฝ ะฒั–ะดั€ั–ะทะฝัั”ั‚ัŒัั ะฒั–ะด `download_file <#download-file>`__ **ะปะธัˆะต** ั‚ะธะผ, ั‰ะพ " -"ะฟั€ะธะนะผะฐั” `file_id` ะฐะฑะพ `Downloadable` ะพะฑโ€™ั”ะบั‚ (ะพะฑโ€™ั”ะบั‚, ัะบะธะน ะผั–ัั‚ะธั‚ัŒ ะฐั‚ั€ะธะฑัƒั‚ " -"`file_id`) ะทะฐะผั–ัั‚ัŒ `file_path`." +"ะ’ั–ะฝ ะฒั–ะดั€ั–ะทะฝัั”ั‚ัŒัั ะฒั–ะด `download_file <#download-file>`__ **ะปะธัˆะต** ั‚ะธะผ, ั‰ะพ" +" ะฟั€ะธะนะผะฐั” `file_id` ะฐะฑะพ `Downloadable` ะพะฑโ€™ั”ะบั‚ (ะพะฑโ€™ั”ะบั‚, ัะบะธะน ะผั–ัั‚ะธั‚ัŒ " +"ะฐั‚ั€ะธะฑัƒั‚ `file_id`) ะทะฐะผั–ัั‚ัŒ `file_path`." #: ../../api/download_file.rst:91 msgid "" "You can download a file to `disk <#download-file-to-disk>`__ or to a " -"`binary I/O <#download-file-to-binary-io-object>`__ object in the same way." +"`binary I/O <#download-file-to-binary-io-object>`__ object in the same " +"way." msgstr "" "ะ’ะธ ะผะพะถะตั‚ะต ะทะฐะฒะฐะฝั‚ะฐะถะธั‚ะธ ั„ะฐะนะป ะฝะฐ `disk <#download-file-to-disk>`__ ะฐะฑะพ ะฒ " "`binary I/O object <#download-file-to-binary-io-object>`__ ั‚ะฐะบ ัะฐะผะพ." @@ -220,3 +217,6 @@ msgstr "" #: ../../api/download_file.rst:93 msgid "Example:" msgstr "ะŸั€ะธะบะปะฐะด:" + +#~ msgid "Bot class" +#~ msgstr "Bot class" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/index.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/index.po index 04fcc637..ad64f7f1 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/enums/index.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,9 +18,12 @@ msgstr "" "Generated-By: Babel 2.10.3\n" #: ../../api/enums/index.rst:3 -msgid "Types" +msgid "Enums" msgstr "" #: ../../api/enums/index.rst:5 msgid "Here is list of all available enums:" msgstr "" + +#~ msgid "Types" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_forum_topic.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_forum_topic.po index b79ff4c7..711dcfaa 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_forum_topic.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_forum_topic.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -49,7 +49,9 @@ msgid "Unique identifier for the target message thread of the forum topic" msgstr "" #: ../../docstring aiogram.methods.edit_forum_topic.EditForumTopic.name:1 of -msgid "New topic name, 1-128 characters" +msgid "" +"New topic name, 0-128 characters. If not specififed or empty, the current" +" name of the topic will be kept" msgstr "" #: ../../docstring @@ -57,7 +59,8 @@ msgstr "" msgid "" "New unique identifier of the custom emoji shown as the topic icon. Use " ":class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers`" -" to get all allowed custom emoji identifiers." +" to get all allowed custom emoji identifiers. Pass an empty string to " +"remove the icon. If not specified, the current icon will be kept" msgstr "" #: ../../api/methods/edit_forum_topic.rst:14 @@ -100,3 +103,15 @@ msgstr "" #~ " to get all allowed custom emoji " #~ "identifiers" #~ msgstr "" + +#~ msgid "New topic name, 1-128 characters" +#~ msgstr "" + +#~ msgid "" +#~ "New unique identifier of the custom " +#~ "emoji shown as the topic icon. Use" +#~ " " +#~ ":class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers`" +#~ " to get all allowed custom emoji " +#~ "identifiers." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_member.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_member.po index 56aedd83..ae8994c9 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_member.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_member.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -30,8 +30,10 @@ msgstr "" #: aiogram.methods.get_chat_member.GetChatMember:1 of msgid "" -"Use this method to get information about a member of a chat. Returns a " -":class:`aiogram.types.chat_member.ChatMember` object on success." +"Use this method to get information about a member of a chat. The method " +"is guaranteed to work only if the bot is an administrator in the chat. " +"Returns a :class:`aiogram.types.chat_member.ChatMember` object on " +"success." msgstr "" #: aiogram.methods.get_chat_member.GetChatMember:3 of @@ -83,3 +85,10 @@ msgstr "" #: ../../api/methods/get_chat_member.rst:45 msgid ":meth:`aiogram.types.chat.Chat.get_member`" msgstr "" + +#~ msgid "" +#~ "Use this method to get information " +#~ "about a member of a chat. Returns" +#~ " a :class:`aiogram.types.chat_member.ChatMember` object" +#~ " on success." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_animation.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_animation.po index d84eff42..57619de4 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_animation.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_animation.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -104,6 +104,13 @@ msgid "" "which can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring aiogram.methods.send_animation.SendAnimation.has_spoiler:1 +#: of +msgid "" +"Pass :code:`True` if the animation needs to be covered with a spoiler " +"animation" +msgstr "" + #: ../../docstring #: aiogram.methods.send_animation.SendAnimation.disable_notification:1 of msgid "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_chat_action.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_chat_action.po index e69951eb..b379f03c 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_chat_action.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_chat_action.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -76,6 +76,11 @@ msgid "" "`_." msgstr "" +#: ../../docstring +#: aiogram.methods.send_chat_action.SendChatAction.message_thread_id:1 of +msgid "Unique identifier for the target message thread; supergroups only" +msgstr "" + #: ../../api/methods/send_chat_action.rst:14 msgid "Usage" msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_photo.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_photo.po index 496a13a5..440f3fb0 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_photo.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_photo.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -77,6 +77,12 @@ msgid "" "which can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring aiogram.methods.send_photo.SendPhoto.has_spoiler:1 of +msgid "" +"Pass :code:`True` if the photo needs to be covered with a spoiler " +"animation" +msgstr "" + #: ../../docstring aiogram.methods.send_photo.SendPhoto.disable_notification:1 #: of msgid "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_video.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_video.po index 55651775..5a575db2 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_video.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_video.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -103,6 +103,12 @@ msgid "" "which can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring aiogram.methods.send_video.SendVideo.has_spoiler:1 of +msgid "" +"Pass :code:`True` if the video needs to be covered with a spoiler " +"animation" +msgstr "" + #: ../../docstring aiogram.methods.send_video.SendVideo.supports_streaming:1 of msgid "Pass :code:`True` if the uploaded video is suitable for streaming" msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat.po index 802289d3..13a50fa1 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -162,6 +162,21 @@ msgid "" ":class:`aiogram.methods.get_chat.GetChat`." msgstr "" +#: ../../docstring aiogram.types.chat.Chat.has_aggressive_anti_spam_enabled:1 +#: of +msgid "" +"*Optional*. :code:`True`, if aggressive anti-spam checks are enabled in " +"the supergroup. The field is only available to chat administrators. " +"Returned only in :class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.has_hidden_members:1 of +msgid "" +"*Optional*. :code:`True`, if non-administrators can only get the list of " +"bots and administrators in the chat. Returned only in " +":class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + #: ../../docstring aiogram.types.chat.Chat.has_protected_content:1 of msgid "" "*Optional*. :code:`True`, if messages from the chat can't be forwarded to" @@ -641,6 +656,10 @@ msgid "" msgstr "" #: aiogram.types.chat.Chat.do:15 of +msgid "Unique identifier for the target message thread; supergroups only" +msgstr "" + +#: aiogram.types.chat.Chat.do:16 of msgid "" "instance of method " ":class:`aiogram.methods.send_chat_action.SendChatAction`" @@ -713,8 +732,10 @@ msgstr "" #: aiogram.types.chat.Chat.get_member:6 of msgid "" -"Use this method to get information about a member of a chat. Returns a " -":class:`aiogram.types.chat_member.ChatMember` object on success." +"Use this method to get information about a member of a chat. The method " +"is guaranteed to work only if the bot is an administrator in the chat. " +"Returns a :class:`aiogram.types.chat_member.ChatMember` object on " +"success." msgstr "" #: aiogram.types.chat.Chat.get_member:8 of @@ -1235,3 +1256,10 @@ msgstr "" #: aiogram.types.chat.Chat.set_photo:11 of msgid "instance of method :class:`aiogram.methods.set_chat_photo.SetChatPhoto`" msgstr "" + +#~ msgid "" +#~ "Use this method to get information " +#~ "about a member of a chat. Returns" +#~ " a :class:`aiogram.types.chat_member.ChatMember` object" +#~ " on success." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/error_event.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/error_event.po index 6cf3b36c..fbaceb09 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/error_event.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/error_event.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -27,6 +27,10 @@ msgid "" " from Telegram" msgstr "" +#: aiogram.types.error_event.ErrorEvent:3 of +msgid "Source: https://core.telegram.org/bots/api#error-event" +msgstr "" + #: ../../docstring aiogram.types.error_event.ErrorEvent.update:1 of msgid "Received update" msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/index.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/index.po index c7493068..8ee34c1a 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/index.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -33,25 +33,29 @@ msgstr "" msgid "Available types" msgstr "" -#: ../../api/types/index.rst:130 +#: ../../api/types/index.rst:134 msgid "Telegram Passport" msgstr "" -#: ../../api/types/index.rst:151 +#: ../../api/types/index.rst:155 msgid "Getting updates" msgstr "" -#: ../../api/types/index.rst:160 +#: ../../api/types/index.rst:164 msgid "Stickers" msgstr "" -#: ../../api/types/index.rst:170 +#: ../../api/types/index.rst:174 msgid "Payments" msgstr "" -#: ../../api/types/index.rst:185 +#: ../../api/types/index.rst:189 msgid "Games" msgstr "" +#: ../../api/types/index.rst:199 +msgid "Internals" +msgstr "" + #~ msgid "Internal events" #~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_animation.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_animation.po index 3a0bffbb..e19c352d 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_animation.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_animation.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -97,3 +97,10 @@ msgstr "" #: aiogram.types.input_media_animation.InputMediaAnimation.duration:1 of msgid "*Optional*. Animation duration in seconds" msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_animation.InputMediaAnimation.has_spoiler:1 of +msgid "" +"*Optional*. Pass :code:`True` if the animation needs to be covered with a" +" spoiler animation" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_photo.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_photo.po index 5d6f0814..10a634e9 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_photo.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_photo.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -62,3 +62,10 @@ msgid "" "*Optional*. List of special entities that appear in the caption, which " "can be specified instead of *parse_mode*" msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_photo.InputMediaPhoto.has_spoiler:1 of +msgid "" +"*Optional*. Pass :code:`True` if the photo needs to be covered with a " +"spoiler animation" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_video.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_video.po index fc4f2e44..eef2e134 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_video.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_video.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -95,3 +95,10 @@ msgid "" "*Optional*. Pass :code:`True` if the uploaded video is suitable for " "streaming" msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_video.InputMediaVideo.has_spoiler:1 of +msgid "" +"*Optional*. Pass :code:`True` if the video needs to be covered with a " +"spoiler animation" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/message.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/message.po index b51e09c8..516aa013 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/message.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/message.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -199,6 +199,12 @@ msgid "" " URLs, bot commands, etc. that appear in the caption" msgstr "" +#: ../../docstring aiogram.types.message.Message.has_media_spoiler:1 of +msgid "" +"*Optional*. :code:`True`, if the message media is covered by a spoiler " +"animation" +msgstr "" + #: ../../docstring aiogram.types.message.Message.contact:1 of msgid "*Optional*. Message is a shared contact, information about the contact" msgstr "" @@ -329,6 +335,12 @@ msgid "" "`_" msgstr "" +#: ../../docstring aiogram.types.message.Message.write_access_allowed:1 of +msgid "" +"*Optional*. Service message: the user allowed the bot added to the " +"attachment menu to write messages" +msgstr "" + #: ../../docstring aiogram.types.message.Message.passport_data:1 of msgid "*Optional*. Telegram Passport data" msgstr "" @@ -343,6 +355,10 @@ msgstr "" msgid "*Optional*. Service message: forum topic created" msgstr "" +#: ../../docstring aiogram.types.message.Message.forum_topic_edited:1 of +msgid "*Optional*. Service message: forum topic edited" +msgstr "" + #: ../../docstring aiogram.types.message.Message.forum_topic_closed:1 of msgid "*Optional*. Service message: forum topic closed" msgstr "" @@ -351,6 +367,16 @@ msgstr "" msgid "*Optional*. Service message: forum topic reopened" msgstr "" +#: ../../docstring aiogram.types.message.Message.general_forum_topic_hidden:1 +#: of +msgid "*Optional*. Service message: the 'General' forum topic hidden" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.general_forum_topic_unhidden:1 +#: of +msgid "*Optional*. Service message: the 'General' forum topic unhidden" +msgstr "" + #: ../../docstring aiogram.types.message.Message.video_chat_scheduled:1 of msgid "*Optional*. Service message: video chat scheduled" msgstr "" @@ -627,8 +653,15 @@ msgid "" "which can be specified instead of *parse_mode*" msgstr "" -#: aiogram.types.message.Message.answer:15 #: aiogram.types.message.Message.answer_animation:19 +#: aiogram.types.message.Message.reply_animation:20 of +msgid "" +"Pass :code:`True` if the animation needs to be covered with a spoiler " +"animation" +msgstr "" + +#: aiogram.types.message.Message.answer:15 +#: aiogram.types.message.Message.answer_animation:20 #: aiogram.types.message.Message.answer_audio:20 #: aiogram.types.message.Message.answer_contact:15 #: aiogram.types.message.Message.answer_dice:12 @@ -636,17 +669,17 @@ msgstr "" #: aiogram.types.message.Message.answer_game:12 #: aiogram.types.message.Message.answer_invoice:32 #: aiogram.types.message.Message.answer_location:17 -#: aiogram.types.message.Message.answer_photo:15 +#: aiogram.types.message.Message.answer_photo:16 #: aiogram.types.message.Message.answer_poll:23 #: aiogram.types.message.Message.answer_sticker:12 #: aiogram.types.message.Message.answer_venue:19 -#: aiogram.types.message.Message.answer_video:20 +#: aiogram.types.message.Message.answer_video:21 #: aiogram.types.message.Message.answer_video_note:15 #: aiogram.types.message.Message.answer_voice:16 #: aiogram.types.message.Message.copy_to:16 #: aiogram.types.message.Message.forward:13 #: aiogram.types.message.Message.reply:16 -#: aiogram.types.message.Message.reply_animation:20 +#: aiogram.types.message.Message.reply_animation:21 #: aiogram.types.message.Message.reply_audio:21 #: aiogram.types.message.Message.reply_contact:16 #: aiogram.types.message.Message.reply_dice:13 @@ -654,11 +687,11 @@ msgstr "" #: aiogram.types.message.Message.reply_game:13 #: aiogram.types.message.Message.reply_invoice:33 #: aiogram.types.message.Message.reply_location:18 -#: aiogram.types.message.Message.reply_photo:16 +#: aiogram.types.message.Message.reply_photo:17 #: aiogram.types.message.Message.reply_poll:24 #: aiogram.types.message.Message.reply_sticker:13 #: aiogram.types.message.Message.reply_venue:20 -#: aiogram.types.message.Message.reply_video:21 +#: aiogram.types.message.Message.reply_video:22 #: aiogram.types.message.Message.reply_video_note:16 #: aiogram.types.message.Message.reply_voice:17 of msgid "" @@ -667,41 +700,41 @@ msgid "" msgstr "" #: aiogram.types.message.Message.answer:16 -#: aiogram.types.message.Message.answer_animation:20 +#: aiogram.types.message.Message.answer_animation:21 #: aiogram.types.message.Message.answer_audio:21 #: aiogram.types.message.Message.answer_contact:16 #: aiogram.types.message.Message.answer_document:18 #: aiogram.types.message.Message.answer_game:13 #: aiogram.types.message.Message.answer_invoice:33 #: aiogram.types.message.Message.answer_location:18 -#: aiogram.types.message.Message.answer_photo:16 +#: aiogram.types.message.Message.answer_photo:17 #: aiogram.types.message.Message.answer_poll:24 #: aiogram.types.message.Message.answer_sticker:13 #: aiogram.types.message.Message.answer_venue:20 -#: aiogram.types.message.Message.answer_video:21 +#: aiogram.types.message.Message.answer_video:22 #: aiogram.types.message.Message.answer_video_note:16 #: aiogram.types.message.Message.answer_voice:17 #: aiogram.types.message.Message.copy_to:17 #: aiogram.types.message.Message.reply:17 -#: aiogram.types.message.Message.reply_animation:21 +#: aiogram.types.message.Message.reply_animation:22 #: aiogram.types.message.Message.reply_audio:22 #: aiogram.types.message.Message.reply_contact:17 #: aiogram.types.message.Message.reply_document:19 #: aiogram.types.message.Message.reply_game:14 #: aiogram.types.message.Message.reply_invoice:34 #: aiogram.types.message.Message.reply_location:19 -#: aiogram.types.message.Message.reply_photo:17 +#: aiogram.types.message.Message.reply_photo:18 #: aiogram.types.message.Message.reply_poll:25 #: aiogram.types.message.Message.reply_sticker:14 #: aiogram.types.message.Message.reply_venue:21 -#: aiogram.types.message.Message.reply_video:22 +#: aiogram.types.message.Message.reply_video:23 #: aiogram.types.message.Message.reply_video_note:17 #: aiogram.types.message.Message.reply_voice:18 of msgid "Protects the contents of the sent message from forwarding and saving" msgstr "" #: aiogram.types.message.Message.answer:18 -#: aiogram.types.message.Message.answer_animation:22 +#: aiogram.types.message.Message.answer_animation:23 #: aiogram.types.message.Message.answer_audio:23 #: aiogram.types.message.Message.answer_contact:18 #: aiogram.types.message.Message.answer_dice:15 @@ -710,16 +743,16 @@ msgstr "" #: aiogram.types.message.Message.answer_invoice:35 #: aiogram.types.message.Message.answer_location:20 #: aiogram.types.message.Message.answer_media_group:15 -#: aiogram.types.message.Message.answer_photo:18 +#: aiogram.types.message.Message.answer_photo:19 #: aiogram.types.message.Message.answer_poll:26 #: aiogram.types.message.Message.answer_sticker:15 #: aiogram.types.message.Message.answer_venue:22 -#: aiogram.types.message.Message.answer_video:23 +#: aiogram.types.message.Message.answer_video:24 #: aiogram.types.message.Message.answer_video_note:18 #: aiogram.types.message.Message.answer_voice:19 #: aiogram.types.message.Message.copy_to:19 #: aiogram.types.message.Message.reply:18 -#: aiogram.types.message.Message.reply_animation:22 +#: aiogram.types.message.Message.reply_animation:23 #: aiogram.types.message.Message.reply_audio:23 #: aiogram.types.message.Message.reply_contact:18 #: aiogram.types.message.Message.reply_dice:15 @@ -728,11 +761,11 @@ msgstr "" #: aiogram.types.message.Message.reply_invoice:35 #: aiogram.types.message.Message.reply_location:20 #: aiogram.types.message.Message.reply_media_group:15 -#: aiogram.types.message.Message.reply_photo:18 +#: aiogram.types.message.Message.reply_photo:19 #: aiogram.types.message.Message.reply_poll:26 #: aiogram.types.message.Message.reply_sticker:15 #: aiogram.types.message.Message.reply_venue:22 -#: aiogram.types.message.Message.reply_video:23 +#: aiogram.types.message.Message.reply_video:24 #: aiogram.types.message.Message.reply_video_note:18 #: aiogram.types.message.Message.reply_voice:19 of msgid "" @@ -741,32 +774,32 @@ msgid "" msgstr "" #: aiogram.types.message.Message.answer:19 -#: aiogram.types.message.Message.answer_animation:23 +#: aiogram.types.message.Message.answer_animation:24 #: aiogram.types.message.Message.answer_audio:24 #: aiogram.types.message.Message.answer_contact:19 #: aiogram.types.message.Message.answer_dice:16 #: aiogram.types.message.Message.answer_document:21 #: aiogram.types.message.Message.answer_location:21 -#: aiogram.types.message.Message.answer_photo:19 +#: aiogram.types.message.Message.answer_photo:20 #: aiogram.types.message.Message.answer_poll:27 #: aiogram.types.message.Message.answer_sticker:16 #: aiogram.types.message.Message.answer_venue:23 -#: aiogram.types.message.Message.answer_video:24 +#: aiogram.types.message.Message.answer_video:25 #: aiogram.types.message.Message.answer_video_note:19 #: aiogram.types.message.Message.answer_voice:20 #: aiogram.types.message.Message.copy_to:20 #: aiogram.types.message.Message.reply:19 -#: aiogram.types.message.Message.reply_animation:23 +#: aiogram.types.message.Message.reply_animation:24 #: aiogram.types.message.Message.reply_audio:24 #: aiogram.types.message.Message.reply_contact:19 #: aiogram.types.message.Message.reply_dice:16 #: aiogram.types.message.Message.reply_document:21 #: aiogram.types.message.Message.reply_location:21 -#: aiogram.types.message.Message.reply_photo:19 +#: aiogram.types.message.Message.reply_photo:20 #: aiogram.types.message.Message.reply_poll:27 #: aiogram.types.message.Message.reply_sticker:16 #: aiogram.types.message.Message.reply_venue:23 -#: aiogram.types.message.Message.reply_video:24 +#: aiogram.types.message.Message.reply_video:25 #: aiogram.types.message.Message.reply_video_note:19 #: aiogram.types.message.Message.reply_voice:20 of msgid "" @@ -824,13 +857,13 @@ msgstr "" msgid "Returns" msgstr "" -#: aiogram.types.message.Message.answer_animation:24 -#: aiogram.types.message.Message.reply_animation:24 of +#: aiogram.types.message.Message.answer_animation:25 +#: aiogram.types.message.Message.reply_animation:25 of msgid "instance of method :class:`aiogram.methods.send_animation.SendAnimation`" msgstr "" #: aiogram.types.message.Message.answer:17 -#: aiogram.types.message.Message.answer_animation:21 +#: aiogram.types.message.Message.answer_animation:22 #: aiogram.types.message.Message.answer_audio:22 #: aiogram.types.message.Message.answer_contact:17 #: aiogram.types.message.Message.answer_dice:14 @@ -838,11 +871,11 @@ msgstr "" #: aiogram.types.message.Message.answer_game:14 #: aiogram.types.message.Message.answer_invoice:34 #: aiogram.types.message.Message.answer_location:19 -#: aiogram.types.message.Message.answer_photo:17 +#: aiogram.types.message.Message.answer_photo:18 #: aiogram.types.message.Message.answer_poll:25 #: aiogram.types.message.Message.answer_sticker:14 #: aiogram.types.message.Message.answer_venue:21 -#: aiogram.types.message.Message.answer_video:22 +#: aiogram.types.message.Message.answer_video:23 #: aiogram.types.message.Message.answer_video_note:17 #: aiogram.types.message.Message.answer_voice:18 #: aiogram.types.message.Message.copy_to:18 of @@ -1450,8 +1483,15 @@ msgid "" "details." msgstr "" -#: aiogram.types.message.Message.answer_photo:20 -#: aiogram.types.message.Message.reply_photo:20 of +#: aiogram.types.message.Message.answer_photo:15 +#: aiogram.types.message.Message.reply_photo:16 of +msgid "" +"Pass :code:`True` if the photo needs to be covered with a spoiler " +"animation" +msgstr "" + +#: aiogram.types.message.Message.answer_photo:21 +#: aiogram.types.message.Message.reply_photo:21 of msgid "instance of method :class:`aiogram.methods.send_photo.SendPhoto`" msgstr "" @@ -1772,11 +1812,18 @@ msgstr "" #: aiogram.types.message.Message.answer_video:19 #: aiogram.types.message.Message.reply_video:20 of +msgid "" +"Pass :code:`True` if the video needs to be covered with a spoiler " +"animation" +msgstr "" + +#: aiogram.types.message.Message.answer_video:20 +#: aiogram.types.message.Message.reply_video:21 of msgid "Pass :code:`True` if the uploaded video is suitable for streaming" msgstr "" -#: aiogram.types.message.Message.answer_video:25 -#: aiogram.types.message.Message.reply_video:25 of +#: aiogram.types.message.Message.answer_video:26 +#: aiogram.types.message.Message.reply_video:26 of msgid "instance of method :class:`aiogram.methods.send_video.SendVideo`" msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/reply_keyboard_markup.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/reply_keyboard_markup.po index 43841e57..4f2b1f86 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/reply_keyboard_markup.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/reply_keyboard_markup.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -41,6 +41,14 @@ msgid "" ":class:`aiogram.types.keyboard_button.KeyboardButton` objects" msgstr "" +#: ../../docstring +#: aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup.is_persistent:1 of +msgid "" +"*Optional*. Requests clients to always show the keyboard when the regular" +" keyboard is hidden. Defaults to *false*, in which case the custom " +"keyboard can be hidden and opened with a keyboard icon." +msgstr "" + #: ../../docstring #: aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup.resize_keyboard:1 of msgid "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/changelog.po b/docs/locale/uk_UA/LC_MESSAGES/changelog.po index 7aa01990..6f0f541b 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/changelog.po +++ b/docs/locale/uk_UA/LC_MESSAGES/changelog.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -22,7 +22,7 @@ msgid "Changelog" msgstr "" #: ../../[towncrier-fragments]:2 -msgid "\\ |release| [UNRELEASED DRAFT] (2022-11-23)" +msgid "\\ |release| [UNRELEASED DRAFT] (2022-12-30)" msgstr "" #: ../../../CHANGES.rst:23 ../../../CHANGES.rst:83 ../../../CHANGES.rst:134 @@ -33,20 +33,108 @@ msgid "Features" msgstr "" #: ../../[towncrier-fragments]:7 +msgid "Added missing shortcuts, new enums, reworked old stuff" +msgstr "" + +#: ../../[towncrier-fragments]:9 msgid "" -"Added missing shortcuts, new enums, reworked old stuff `#952 " -"`_" +"**Breaking** All previously added enums is re-generated in new place - " +"`aiogram.enums` instead of `aiogram.types`" +msgstr "" + +#: ../../[towncrier-fragments]:27 +msgid "" +"**Added enums:** " +":class:`aiogram.enums.bot_command_scope_type.BotCommandScopeType`," +msgstr "" + +#: ../../[towncrier-fragments]:13 +msgid "" +":class:`aiogram.enums.chat_action.ChatActions`, " +":class:`aiogram.enums.chat_member_status.ChatMemberStatus`, " +":class:`aiogram.enums.chat_type.ChatType`, " +":class:`aiogram.enums.content_type.ContentType`, " +":class:`aiogram.enums.dice_emoji.DiceEmoji`, " +":class:`aiogram.enums.inline_query_result_type.InlineQueryResultType`, " +":class:`aiogram.enums.input_media_type.InputMediaType`, " +":class:`aiogram.enums.mask_position_point.MaskPositionPoint`, " +":class:`aiogram.enums.menu_button_type.MenuButtonType`, " +":class:`aiogram.enums.message_entity_type.MessageEntityType`, " +":class:`aiogram.enums.parse_mode.ParseMode`, " +":class:`aiogram.enums.poll_type.PollType`, " +":class:`aiogram.enums.sticker_type.StickerType`, " +":class:`aiogram.enums.topic_icon_color.TopicIconColor`, " +":class:`aiogram.enums.update_type.UpdateType`," +msgstr "" + +#: ../../[towncrier-fragments]:29 +msgid "**Added shortcuts**:" +msgstr "" + +#: ../../[towncrier-fragments]:54 +msgid "*Chat* :meth:`aiogram.types.chat.Chat.get_administrators`," +msgstr "" + +#: ../../[towncrier-fragments]:32 +msgid "" +":meth:`aiogram.types.chat.Chat.delete_message`, " +":meth:`aiogram.types.chat.Chat.revoke_invite_link`, " +":meth:`aiogram.types.chat.Chat.edit_invite_link`, " +":meth:`aiogram.types.chat.Chat.create_invite_link`, " +":meth:`aiogram.types.chat.Chat.export_invite_link`, " +":meth:`aiogram.types.chat.Chat.do`, " +":meth:`aiogram.types.chat.Chat.delete_sticker_set`, " +":meth:`aiogram.types.chat.Chat.set_sticker_set`, " +":meth:`aiogram.types.chat.Chat.get_member`, " +":meth:`aiogram.types.chat.Chat.get_member_count`, " +":meth:`aiogram.types.chat.Chat.leave`, " +":meth:`aiogram.types.chat.Chat.unpin_all_messages`, " +":meth:`aiogram.types.chat.Chat.unpin_message`, " +":meth:`aiogram.types.chat.Chat.pin_message`, " +":meth:`aiogram.types.chat.Chat.set_administrator_custom_title`, " +":meth:`aiogram.types.chat.Chat.set_permissions`, " +":meth:`aiogram.types.chat.Chat.promote`, " +":meth:`aiogram.types.chat.Chat.restrict`, " +":meth:`aiogram.types.chat.Chat.unban`, " +":meth:`aiogram.types.chat.Chat.ban`, " +":meth:`aiogram.types.chat.Chat.set_description`, " +":meth:`aiogram.types.chat.Chat.set_title`, " +":meth:`aiogram.types.chat.Chat.delete_photo`, " +":meth:`aiogram.types.chat.Chat.set_photo`," +msgstr "" + +#: ../../[towncrier-fragments]:56 +msgid "*Sticker*: :meth:`aiogram.types.sticker.Sticker.set_position_in_set`," +msgstr "" + +#: ../../[towncrier-fragments]:57 +msgid ":meth:`aiogram.types.sticker.Sticker.delete_from_set`," +msgstr "" + +#: ../../[towncrier-fragments]:58 +msgid "*User*: :meth:`aiogram.types.user.User.get_profile_photos`" +msgstr "" + +#: ../../[towncrier-fragments]:59 +msgid "`#952 `_" +msgstr "" + +#: ../../[towncrier-fragments]:60 +msgid "" +"Added full support of `Bot API 6.4 `_ `#1088 " +"`_" msgstr "" #: ../../../CHANGES.rst:71 ../../../CHANGES.rst:124 ../../../CHANGES.rst:175 #: ../../../CHANGES.rst:229 ../../../CHANGES.rst:271 ../../../CHANGES.rst:317 #: ../../../CHANGES.rst:377 ../../../CHANGES.rst:398 ../../../CHANGES.rst:421 #: ../../../CHANGES.rst:458 ../../../CHANGES.rst:497 -#: ../../[towncrier-fragments]:12 +#: ../../[towncrier-fragments]:65 msgid "Misc" msgstr "" -#: ../../[towncrier-fragments]:14 +#: ../../[towncrier-fragments]:67 msgid "" "Added integration with new code-generator named `Butcher " "`_ `#1069 " @@ -2405,3 +2493,12 @@ msgstr "" #~ ":code:`ChatMemberStatus.yml` was renamed to " #~ ":code:`is_chat_member` and :code:`is_chat_admin`" #~ msgstr "" + +#~ msgid "\\ |release| [UNRELEASED DRAFT] (2022-11-23)" +#~ msgstr "" + +#~ msgid "" +#~ "Added missing shortcuts, new enums, " +#~ "reworked old stuff `#952 " +#~ "`_" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/index.po b/docs/locale/uk_UA/LC_MESSAGES/index.po index 75a39e96..1d6913cf 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/index.po +++ b/docs/locale/uk_UA/LC_MESSAGES/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-03 01:03+0300\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -131,8 +131,9 @@ msgid "Supports `PyPy `_" msgstr "ะŸั€ะฐั†ัŽั” ะท `PyPy `_" #: ../../../README.rst:70 +#, fuzzy msgid "" -"Supports `Telegram Bot API 6.3 `_ and" +"Supports `Telegram Bot API 6.4 `_ and" " gets fast updates to the latest versions of the Bot API" msgstr "" "ะŸั–ะดั‚ั€ะธะผัƒั” `Telegram Bot API 6.3 `_ ั‚ะฐ" diff --git a/tests/test_api/test_client/test_bot.py b/tests/test_api/test_client/test_bot.py index 7266bdcd..1cf94238 100644 --- a/tests/test_api/test_client/test_bot.py +++ b/tests/test_api/test_client/test_bot.py @@ -14,8 +14,6 @@ from aiogram.methods import GetFile, GetMe from aiogram.types import File, PhotoSize from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestBot: def test_init(self): diff --git a/tests/test_api/test_client/test_session/test_aiohttp_session.py b/tests/test_api/test_client/test_session/test_aiohttp_session.py index 6dbf213c..14c25ad3 100644 --- a/tests/test_api/test_client/test_session/test_aiohttp_session.py +++ b/tests/test_api/test_client/test_session/test_aiohttp_session.py @@ -15,8 +15,6 @@ from aiogram.methods import Request, TelegramMethod from aiogram.types import UNSET, InputFile from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class BareInputFile(InputFile): async def read(self, chunk_size: int): diff --git a/tests/test_api/test_client/test_session/test_base_session.py b/tests/test_api/test_client/test_session/test_base_session.py index 51803094..e46981f6 100644 --- a/tests/test_api/test_client/test_session/test_base_session.py +++ b/tests/test_api/test_client/test_session/test_base_session.py @@ -27,8 +27,6 @@ from aiogram.methods import DeleteMessage, GetMe, TelegramMethod from aiogram.types import UNSET, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class CustomSession(BaseSession): async def close(self): diff --git a/tests/test_api/test_client/test_session/test_middlewares/test_request_logging.py b/tests/test_api/test_client/test_session/test_middlewares/test_request_logging.py index 33e40992..9772bf2b 100644 --- a/tests/test_api/test_client/test_session/test_middlewares/test_request_logging.py +++ b/tests/test_api/test_client/test_session/test_middlewares/test_request_logging.py @@ -1,15 +1,11 @@ import datetime import logging -import pytest - from aiogram.client.session.middlewares.request_logging import RequestLogging from aiogram.methods import GetMe, SendMessage from aiogram.types import Chat, Message, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestRequestLogging: async def test_use_middleware(self, bot: MockedBot, caplog): diff --git a/tests/test_api/test_methods/test_add_sticker_to_set.py b/tests/test_api/test_methods/test_add_sticker_to_set.py index 35a08f75..0bc6472c 100644 --- a/tests/test_api/test_methods/test_add_sticker_to_set.py +++ b/tests/test_api/test_methods/test_add_sticker_to_set.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import AddStickerToSet, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestAddStickerToSet: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_answer_callback_query.py b/tests/test_api/test_methods/test_answer_callback_query.py index f157e86f..54f9e640 100644 --- a/tests/test_api/test_methods/test_answer_callback_query.py +++ b/tests/test_api/test_methods/test_answer_callback_query.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import AnswerCallbackQuery, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestAnswerCallbackQuery: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_answer_inline_query.py b/tests/test_api/test_methods/test_answer_inline_query.py index 98227b57..ba7cc938 100644 --- a/tests/test_api/test_methods/test_answer_inline_query.py +++ b/tests/test_api/test_methods/test_answer_inline_query.py @@ -1,12 +1,8 @@ -import pytest - from aiogram import Bot from aiogram.methods import AnswerInlineQuery, Request from aiogram.types import InlineQueryResult, InlineQueryResultPhoto, InputTextMessageContent from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestAnswerInlineQuery: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_answer_pre_checkout_query.py b/tests/test_api/test_methods/test_answer_pre_checkout_query.py index 7d0077c7..f15f5beb 100644 --- a/tests/test_api/test_methods/test_answer_pre_checkout_query.py +++ b/tests/test_api/test_methods/test_answer_pre_checkout_query.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import AnswerPreCheckoutQuery, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestAnswerPreCheckoutQuery: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_answer_shipping_query.py b/tests/test_api/test_methods/test_answer_shipping_query.py index 1374543e..8a2b5f89 100644 --- a/tests/test_api/test_methods/test_answer_shipping_query.py +++ b/tests/test_api/test_methods/test_answer_shipping_query.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import AnswerShippingQuery, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestAnswerShippingQuery: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_answer_web_app_query.py b/tests/test_api/test_methods/test_answer_web_app_query.py index 8d9848da..713653f1 100644 --- a/tests/test_api/test_methods/test_answer_web_app_query.py +++ b/tests/test_api/test_methods/test_answer_web_app_query.py @@ -1,12 +1,9 @@ -import pytest - from aiogram.methods import AnswerWebAppQuery, Request from aiogram.types import InlineQueryResult, SentWebAppMessage from tests.mocked_bot import MockedBot class TestAnswerWebAppQuery: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(AnswerWebAppQuery, ok=True, result=SentWebAppMessage()) @@ -19,7 +16,6 @@ class TestAnswerWebAppQuery: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(AnswerWebAppQuery, ok=True, result=SentWebAppMessage()) diff --git a/tests/test_api/test_methods/test_approve_chat_join_request.py b/tests/test_api/test_methods/test_approve_chat_join_request.py index 52d6554a..ea81c4ac 100755 --- a/tests/test_api/test_methods/test_approve_chat_join_request.py +++ b/tests/test_api/test_methods/test_approve_chat_join_request.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import ApproveChatJoinRequest, Request from tests.mocked_bot import MockedBot class TestApproveChatJoinRequest: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(ApproveChatJoinRequest, ok=True, result=True) @@ -17,7 +14,6 @@ class TestApproveChatJoinRequest: assert request.method == "approveChatJoinRequest" assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(ApproveChatJoinRequest, ok=True, result=None) diff --git a/tests/test_api/test_methods/test_ban_chat_member.py b/tests/test_api/test_methods/test_ban_chat_member.py index 73090f40..10464737 100644 --- a/tests/test_api/test_methods/test_ban_chat_member.py +++ b/tests/test_api/test_methods/test_ban_chat_member.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import BanChatMember, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestKickChatMember: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_ban_chat_sender_chat.py b/tests/test_api/test_methods/test_ban_chat_sender_chat.py index 1d832e87..b93f27a5 100755 --- a/tests/test_api/test_methods/test_ban_chat_sender_chat.py +++ b/tests/test_api/test_methods/test_ban_chat_sender_chat.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import BanChatSenderChat, Request from tests.mocked_bot import MockedBot class TestBanChatSenderChat: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(BanChatSenderChat, ok=True, result=True) @@ -18,7 +15,6 @@ class TestBanChatSenderChat: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(BanChatSenderChat, ok=True, result=True) diff --git a/tests/test_api/test_methods/test_base.py b/tests/test_api/test_methods/test_base.py index 4dc39946..38306db1 100644 --- a/tests/test_api/test_methods/test_base.py +++ b/tests/test_api/test_methods/test_base.py @@ -6,8 +6,6 @@ from aiogram import Bot from aiogram.methods.base import prepare_parse_mode from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestPrepareFile: # TODO: Add tests diff --git a/tests/test_api/test_methods/test_close.py b/tests/test_api/test_methods/test_close.py index c6a84e31..f8f8956b 100644 --- a/tests/test_api/test_methods/test_close.py +++ b/tests/test_api/test_methods/test_close.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Close, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestClose: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_close_forum_topic.py b/tests/test_api/test_methods/test_close_forum_topic.py index a9fa87b3..4857e7a4 100644 --- a/tests/test_api/test_methods/test_close_forum_topic.py +++ b/tests/test_api/test_methods/test_close_forum_topic.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import CloseForumTopic, Request from tests.mocked_bot import MockedBot class TestCloseForumTopic: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(CloseForumTopic, ok=True, result=True) @@ -18,7 +15,6 @@ class TestCloseForumTopic: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(CloseForumTopic, ok=True, result=True) diff --git a/tests/test_api/test_methods/test_close_general_forum_topic.py b/tests/test_api/test_methods/test_close_general_forum_topic.py new file mode 100644 index 00000000..a62ce146 --- /dev/null +++ b/tests/test_api/test_methods/test_close_general_forum_topic.py @@ -0,0 +1,20 @@ +from aiogram.methods import CloseGeneralForumTopic, Request +from tests.mocked_bot import MockedBot + + +class TestCloseGeneralForumTopic: + async def test_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(CloseGeneralForumTopic, ok=True, result=True) + + response: bool = await bot(CloseGeneralForumTopic(chat_id=42)) + request: Request = bot.get_request() + assert request.method == "closeGeneralForumTopic" + assert response == prepare_result.result + + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(CloseGeneralForumTopic, ok=True, result=True) + + response: bool = await bot.close_general_forum_topic(chat_id=42) + request: Request = bot.get_request() + assert request.method == "closeGeneralForumTopic" + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_copy_message.py b/tests/test_api/test_methods/test_copy_message.py index e844cede..38419c6b 100644 --- a/tests/test_api/test_methods/test_copy_message.py +++ b/tests/test_api/test_methods/test_copy_message.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import CopyMessage, Request from aiogram.types import MessageId from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestCopyMessage: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_create_chat_invite_link.py b/tests/test_api/test_methods/test_create_chat_invite_link.py index c07c55bc..cfdca233 100644 --- a/tests/test_api/test_methods/test_create_chat_invite_link.py +++ b/tests/test_api/test_methods/test_create_chat_invite_link.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import CreateChatInviteLink, Request from aiogram.types import ChatInviteLink, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestCreateChatInviteLink: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_create_forum_topic.py b/tests/test_api/test_methods/test_create_forum_topic.py index 69f5ff3d..84eaf02e 100644 --- a/tests/test_api/test_methods/test_create_forum_topic.py +++ b/tests/test_api/test_methods/test_create_forum_topic.py @@ -1,12 +1,9 @@ -import pytest - from aiogram.methods import CreateForumTopic, Request from aiogram.types import ForumTopic from tests.mocked_bot import MockedBot class TestCreateForumTopic: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for( CreateForumTopic, @@ -23,7 +20,6 @@ class TestCreateForumTopic: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( CreateForumTopic, diff --git a/tests/test_api/test_methods/test_create_invoice_link.py b/tests/test_api/test_methods/test_create_invoice_link.py index 2a3e16ac..7909fac9 100644 --- a/tests/test_api/test_methods/test_create_invoice_link.py +++ b/tests/test_api/test_methods/test_create_invoice_link.py @@ -1,12 +1,9 @@ -import pytest - from aiogram.methods import CreateInvoiceLink, Request from aiogram.types import LabeledPrice from tests.mocked_bot import MockedBot class TestCreateInvoiceLink: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for( CreateInvoiceLink, ok=True, result="https://t.me/invoice/example" @@ -24,7 +21,6 @@ class TestCreateInvoiceLink: assert request.method == "createInvoiceLink" assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( CreateInvoiceLink, ok=True, result="https://t.me/invoice/example" diff --git a/tests/test_api/test_methods/test_create_new_sticker_set.py b/tests/test_api/test_methods/test_create_new_sticker_set.py index 4c927b77..b82b1974 100644 --- a/tests/test_api/test_methods/test_create_new_sticker_set.py +++ b/tests/test_api/test_methods/test_create_new_sticker_set.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import CreateNewStickerSet, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestCreateNewStickerSet: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_decline_chat_join_request.py b/tests/test_api/test_methods/test_decline_chat_join_request.py index e6e60ca5..549f43d1 100755 --- a/tests/test_api/test_methods/test_decline_chat_join_request.py +++ b/tests/test_api/test_methods/test_decline_chat_join_request.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import DeclineChatJoinRequest, Request from tests.mocked_bot import MockedBot class TestDeclineChatJoinRequest: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeclineChatJoinRequest, ok=True, result=True) @@ -17,7 +14,6 @@ class TestDeclineChatJoinRequest: assert request.method == "declineChatJoinRequest" assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeclineChatJoinRequest, ok=True, result=True) diff --git a/tests/test_api/test_methods/test_delete_chat_photo.py b/tests/test_api/test_methods/test_delete_chat_photo.py index 0f528775..9faaa8bf 100644 --- a/tests/test_api/test_methods/test_delete_chat_photo.py +++ b/tests/test_api/test_methods/test_delete_chat_photo.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import DeleteChatPhoto, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestDeleteChatPhoto: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_delete_chat_sticker_set.py b/tests/test_api/test_methods/test_delete_chat_sticker_set.py index 8fdb7b84..ae6af449 100644 --- a/tests/test_api/test_methods/test_delete_chat_sticker_set.py +++ b/tests/test_api/test_methods/test_delete_chat_sticker_set.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import DeleteChatStickerSet, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestDeleteChatStickerSet: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_delete_forum_topic.py b/tests/test_api/test_methods/test_delete_forum_topic.py index 773627fe..e0ad6bfd 100644 --- a/tests/test_api/test_methods/test_delete_forum_topic.py +++ b/tests/test_api/test_methods/test_delete_forum_topic.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import DeleteForumTopic, Request from tests.mocked_bot import MockedBot class TestDeleteForumTopic: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeleteForumTopic, ok=True, result=True) @@ -18,7 +15,6 @@ class TestDeleteForumTopic: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeleteForumTopic, ok=True, result=True) diff --git a/tests/test_api/test_methods/test_delete_message.py b/tests/test_api/test_methods/test_delete_message.py index ecceb6dd..097496a2 100644 --- a/tests/test_api/test_methods/test_delete_message.py +++ b/tests/test_api/test_methods/test_delete_message.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import DeleteMessage, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestDeleteMessage: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_delete_my_commands.py b/tests/test_api/test_methods/test_delete_my_commands.py index 14d36381..c4902ec4 100644 --- a/tests/test_api/test_methods/test_delete_my_commands.py +++ b/tests/test_api/test_methods/test_delete_my_commands.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import DeleteMyCommands, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestKickChatMember: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_delete_sticker_from_set.py b/tests/test_api/test_methods/test_delete_sticker_from_set.py index c17a5493..bc2a8e79 100644 --- a/tests/test_api/test_methods/test_delete_sticker_from_set.py +++ b/tests/test_api/test_methods/test_delete_sticker_from_set.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import DeleteStickerFromSet, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestDeleteStickerFromSet: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_delete_webhook.py b/tests/test_api/test_methods/test_delete_webhook.py index 21c0fcf7..76591a8a 100644 --- a/tests/test_api/test_methods/test_delete_webhook.py +++ b/tests/test_api/test_methods/test_delete_webhook.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import DeleteWebhook, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestDeleteWebhook: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_edit_chat_invite_link.py b/tests/test_api/test_methods/test_edit_chat_invite_link.py index a1fd6a10..ab71c3ae 100644 --- a/tests/test_api/test_methods/test_edit_chat_invite_link.py +++ b/tests/test_api/test_methods/test_edit_chat_invite_link.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import EditChatInviteLink, Request from aiogram.types import ChatInviteLink, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestEditChatInviteLink: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_edit_forum_topic.py b/tests/test_api/test_methods/test_edit_forum_topic.py index 5441bd9b..98e30166 100644 --- a/tests/test_api/test_methods/test_edit_forum_topic.py +++ b/tests/test_api/test_methods/test_edit_forum_topic.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import EditForumTopic, Request from tests.mocked_bot import MockedBot class TestEditForumTopic: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(EditForumTopic, ok=True, result=True) @@ -21,7 +18,6 @@ class TestEditForumTopic: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(EditForumTopic, ok=True, result=True) diff --git a/tests/test_api/test_methods/test_edit_general_forum_topic.py b/tests/test_api/test_methods/test_edit_general_forum_topic.py new file mode 100644 index 00000000..01bff1d6 --- /dev/null +++ b/tests/test_api/test_methods/test_edit_general_forum_topic.py @@ -0,0 +1,20 @@ +from aiogram.methods import EditGeneralForumTopic, Request +from tests.mocked_bot import MockedBot + + +class TestCloseGeneralForumTopic: + async def test_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(EditGeneralForumTopic, ok=True, result=True) + + response: bool = await bot(EditGeneralForumTopic(chat_id=42, name="Test")) + request: Request = bot.get_request() + assert request.method == "editGeneralForumTopic" + assert response == prepare_result.result + + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(EditGeneralForumTopic, ok=True, result=True) + + response: bool = await bot.edit_general_forum_topic(chat_id=42, name="Test") + request: Request = bot.get_request() + assert request.method == "editGeneralForumTopic" + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_edit_message_caption.py b/tests/test_api/test_methods/test_edit_message_caption.py index a3afef46..71a7784e 100644 --- a/tests/test_api/test_methods/test_edit_message_caption.py +++ b/tests/test_api/test_methods/test_edit_message_caption.py @@ -1,14 +1,10 @@ import datetime from typing import Union -import pytest - from aiogram.methods import EditMessageCaption, Request from aiogram.types import Chat, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestEditMessageCaption: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_edit_message_live_location.py b/tests/test_api/test_methods/test_edit_message_live_location.py index 32f19b2f..7a2c2f7d 100644 --- a/tests/test_api/test_methods/test_edit_message_live_location.py +++ b/tests/test_api/test_methods/test_edit_message_live_location.py @@ -1,13 +1,9 @@ from typing import Union -import pytest - from aiogram.methods import EditMessageLiveLocation, Request from aiogram.types import Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestEditMessageLiveLocation: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_edit_message_media.py b/tests/test_api/test_methods/test_edit_message_media.py index bc60e4d5..15594aff 100644 --- a/tests/test_api/test_methods/test_edit_message_media.py +++ b/tests/test_api/test_methods/test_edit_message_media.py @@ -1,13 +1,9 @@ from typing import Union -import pytest - from aiogram.methods import EditMessageMedia, Request from aiogram.types import BufferedInputFile, InputMediaPhoto, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestEditMessageMedia: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_edit_message_reply_markup.py b/tests/test_api/test_methods/test_edit_message_reply_markup.py index 71a1f823..38baa76f 100644 --- a/tests/test_api/test_methods/test_edit_message_reply_markup.py +++ b/tests/test_api/test_methods/test_edit_message_reply_markup.py @@ -1,13 +1,9 @@ from typing import Union -import pytest - from aiogram.methods import EditMessageReplyMarkup, Request from aiogram.types import InlineKeyboardButton, InlineKeyboardMarkup, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestEditMessageReplyMarkup: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_edit_message_text.py b/tests/test_api/test_methods/test_edit_message_text.py index 5543f62c..1cdfcfe0 100644 --- a/tests/test_api/test_methods/test_edit_message_text.py +++ b/tests/test_api/test_methods/test_edit_message_text.py @@ -1,13 +1,9 @@ from typing import Union -import pytest - from aiogram.methods import EditMessageText, Request from aiogram.types import Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestEditMessageText: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_export_chat_invite_link.py b/tests/test_api/test_methods/test_export_chat_invite_link.py index fc8b4f13..7e3901a0 100644 --- a/tests/test_api/test_methods/test_export_chat_invite_link.py +++ b/tests/test_api/test_methods/test_export_chat_invite_link.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import ExportChatInviteLink, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestExportChatInviteLink: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_forward_message.py b/tests/test_api/test_methods/test_forward_message.py index 94dfdf60..955b6456 100644 --- a/tests/test_api/test_methods/test_forward_message.py +++ b/tests/test_api/test_methods/test_forward_message.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import ForwardMessage, Request from aiogram.types import Chat, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestForwardMessage: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_chat.py b/tests/test_api/test_methods/test_get_chat.py index f5117d11..c5d4bfcd 100644 --- a/tests/test_api/test_methods/test_get_chat.py +++ b/tests/test_api/test_methods/test_get_chat.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import GetChat, Request from aiogram.types import Chat from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetChat: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_chat_administrators.py b/tests/test_api/test_methods/test_get_chat_administrators.py index e254d34e..945b2e02 100644 --- a/tests/test_api/test_methods/test_get_chat_administrators.py +++ b/tests/test_api/test_methods/test_get_chat_administrators.py @@ -1,13 +1,9 @@ from typing import List -import pytest - from aiogram.methods import GetChatAdministrators, Request from aiogram.types import ChatMember, ChatMemberOwner, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetChatAdministrators: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_chat_member.py b/tests/test_api/test_methods/test_get_chat_member.py index 35dc98bd..e2fd2a75 100644 --- a/tests/test_api/test_methods/test_get_chat_member.py +++ b/tests/test_api/test_methods/test_get_chat_member.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import GetChatMember, Request from aiogram.types import ChatMember, ChatMemberOwner, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetChatMember: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_chat_member_count.py b/tests/test_api/test_methods/test_get_chat_member_count.py index e0fd1a4a..91a7c514 100644 --- a/tests/test_api/test_methods/test_get_chat_member_count.py +++ b/tests/test_api/test_methods/test_get_chat_member_count.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import GetChatMemberCount, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetChatMembersCount: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_chat_menu_button.py b/tests/test_api/test_methods/test_get_chat_menu_button.py index a7c2fd37..89181d3f 100644 --- a/tests/test_api/test_methods/test_get_chat_menu_button.py +++ b/tests/test_api/test_methods/test_get_chat_menu_button.py @@ -1,12 +1,9 @@ -import pytest - from aiogram.methods import GetChatMenuButton, Request from aiogram.types import MenuButton, MenuButtonDefault from tests.mocked_bot import MockedBot class TestGetChatMenuButton: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(GetChatMenuButton, ok=True, result=MenuButtonDefault()) @@ -16,7 +13,6 @@ class TestGetChatMenuButton: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(GetChatMenuButton, ok=True, result=MenuButtonDefault()) diff --git a/tests/test_api/test_methods/test_get_custom_emoji_stickers.py b/tests/test_api/test_methods/test_get_custom_emoji_stickers.py index b47bc4c5..fd3ea8ff 100644 --- a/tests/test_api/test_methods/test_get_custom_emoji_stickers.py +++ b/tests/test_api/test_methods/test_get_custom_emoji_stickers.py @@ -1,14 +1,11 @@ from typing import List -import pytest - from aiogram.methods import GetCustomEmojiStickers, Request from aiogram.types import Sticker from tests.mocked_bot import MockedBot class TestGetCustomEmojiStickers: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetCustomEmojiStickers, @@ -35,7 +32,6 @@ class TestGetCustomEmojiStickers: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetCustomEmojiStickers, diff --git a/tests/test_api/test_methods/test_get_file.py b/tests/test_api/test_methods/test_get_file.py index 38923a6e..eb95cd20 100644 --- a/tests/test_api/test_methods/test_get_file.py +++ b/tests/test_api/test_methods/test_get_file.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import GetFile, Request from aiogram.types import File from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetFile: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_forum_topic_icon_stickers.py b/tests/test_api/test_methods/test_get_forum_topic_icon_stickers.py index d8233eea..c9a1455a 100644 --- a/tests/test_api/test_methods/test_get_forum_topic_icon_stickers.py +++ b/tests/test_api/test_methods/test_get_forum_topic_icon_stickers.py @@ -1,14 +1,11 @@ from typing import List -import pytest - from aiogram.methods import GetForumTopicIconStickers, Request from aiogram.types import Sticker from tests.mocked_bot import MockedBot class TestGetForumTopicIconStickers: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(GetForumTopicIconStickers, ok=True, result=[]) @@ -18,7 +15,6 @@ class TestGetForumTopicIconStickers: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(GetForumTopicIconStickers, ok=True, result=[]) diff --git a/tests/test_api/test_methods/test_get_game_high_scores.py b/tests/test_api/test_methods/test_get_game_high_scores.py index bc2c7116..fe84d21d 100644 --- a/tests/test_api/test_methods/test_get_game_high_scores.py +++ b/tests/test_api/test_methods/test_get_game_high_scores.py @@ -1,13 +1,9 @@ from typing import List -import pytest - from aiogram.methods import GetGameHighScores, Request from aiogram.types import GameHighScore, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetGameHighScores: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_me.py b/tests/test_api/test_methods/test_get_me.py index ba51e6a6..70f274ec 100644 --- a/tests/test_api/test_methods/test_get_me.py +++ b/tests/test_api/test_methods/test_get_me.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import GetMe, Request from aiogram.types import User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetMe: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_my_commands.py b/tests/test_api/test_methods/test_get_my_commands.py index a28ef026..c627ff11 100644 --- a/tests/test_api/test_methods/test_get_my_commands.py +++ b/tests/test_api/test_methods/test_get_my_commands.py @@ -1,13 +1,9 @@ from typing import List -import pytest - from aiogram.methods import GetMyCommands, Request from aiogram.types import BotCommand from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetMyCommands: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_my_default_administrator_rights.py b/tests/test_api/test_methods/test_get_my_default_administrator_rights.py index 179b468d..7e843686 100644 --- a/tests/test_api/test_methods/test_get_my_default_administrator_rights.py +++ b/tests/test_api/test_methods/test_get_my_default_administrator_rights.py @@ -1,12 +1,9 @@ -import pytest - from aiogram.methods import GetMyDefaultAdministratorRights, Request from aiogram.types import ChatAdministratorRights from tests.mocked_bot import MockedBot class TestGetMyDefaultAdministratorRights: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetMyDefaultAdministratorRights, @@ -29,7 +26,6 @@ class TestGetMyDefaultAdministratorRights: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetMyDefaultAdministratorRights, diff --git a/tests/test_api/test_methods/test_get_sticker_set.py b/tests/test_api/test_methods/test_get_sticker_set.py index 377a81c0..d8e7ca45 100644 --- a/tests/test_api/test_methods/test_get_sticker_set.py +++ b/tests/test_api/test_methods/test_get_sticker_set.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import GetStickerSet, Request from aiogram.types import Sticker, StickerSet from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetStickerSet: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_updates.py b/tests/test_api/test_methods/test_get_updates.py index 8f8dfa87..b4cd11b9 100644 --- a/tests/test_api/test_methods/test_get_updates.py +++ b/tests/test_api/test_methods/test_get_updates.py @@ -1,13 +1,9 @@ from typing import List -import pytest - from aiogram.methods import GetUpdates, Request from aiogram.types import Update from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetUpdates: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_user_profile_photos.py b/tests/test_api/test_methods/test_get_user_profile_photos.py index d6094eb9..cbfd0dbc 100644 --- a/tests/test_api/test_methods/test_get_user_profile_photos.py +++ b/tests/test_api/test_methods/test_get_user_profile_photos.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import GetUserProfilePhotos, Request from aiogram.types import PhotoSize, UserProfilePhotos from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetUserProfilePhotos: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_webhook_info.py b/tests/test_api/test_methods/test_get_webhook_info.py index f50213cb..06d11dbc 100644 --- a/tests/test_api/test_methods/test_get_webhook_info.py +++ b/tests/test_api/test_methods/test_get_webhook_info.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import GetWebhookInfo, Request from aiogram.types import WebhookInfo from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetWebhookInfo: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_hide_general_forum_topic.py b/tests/test_api/test_methods/test_hide_general_forum_topic.py new file mode 100644 index 00000000..51e6684b --- /dev/null +++ b/tests/test_api/test_methods/test_hide_general_forum_topic.py @@ -0,0 +1,20 @@ +from aiogram.methods import HideGeneralForumTopic, Request +from tests.mocked_bot import MockedBot + + +class TestHideGeneralForumTopic: + async def test_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(HideGeneralForumTopic, ok=True, result=True) + + response: bool = await bot(HideGeneralForumTopic(chat_id=42)) + request: Request = bot.get_request() + assert request.method == "hideGeneralForumTopic" + assert response == prepare_result.result + + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(HideGeneralForumTopic, ok=True, result=True) + + response: bool = await bot.hide_general_forum_topic(chat_id=42) + request: Request = bot.get_request() + assert request.method == "hideGeneralForumTopic" + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_leave_chat.py b/tests/test_api/test_methods/test_leave_chat.py index 77bf739f..db771a7d 100644 --- a/tests/test_api/test_methods/test_leave_chat.py +++ b/tests/test_api/test_methods/test_leave_chat.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import LeaveChat, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestLeaveChat: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_log_out.py b/tests/test_api/test_methods/test_log_out.py index b472da50..fd09d116 100644 --- a/tests/test_api/test_methods/test_log_out.py +++ b/tests/test_api/test_methods/test_log_out.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import LogOut, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestLogOut: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_pin_chat_message.py b/tests/test_api/test_methods/test_pin_chat_message.py index 59a2bf91..f74cd4cd 100644 --- a/tests/test_api/test_methods/test_pin_chat_message.py +++ b/tests/test_api/test_methods/test_pin_chat_message.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import PinChatMessage, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestPinChatMessage: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_promote_chat_member.py b/tests/test_api/test_methods/test_promote_chat_member.py index 20c796bd..6721eb1f 100644 --- a/tests/test_api/test_methods/test_promote_chat_member.py +++ b/tests/test_api/test_methods/test_promote_chat_member.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import PromoteChatMember, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestPromoteChatMember: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_reopen_forum_topic.py b/tests/test_api/test_methods/test_reopen_forum_topic.py index 9fe47eac..2c4a33b2 100644 --- a/tests/test_api/test_methods/test_reopen_forum_topic.py +++ b/tests/test_api/test_methods/test_reopen_forum_topic.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import ReopenForumTopic, Request from tests.mocked_bot import MockedBot class TestReopenForumTopic: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(ReopenForumTopic, ok=True, result=None) @@ -18,7 +15,6 @@ class TestReopenForumTopic: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(ReopenForumTopic, ok=True, result=None) diff --git a/tests/test_api/test_methods/test_reopen_general_forum_topic.py b/tests/test_api/test_methods/test_reopen_general_forum_topic.py new file mode 100644 index 00000000..af1abf55 --- /dev/null +++ b/tests/test_api/test_methods/test_reopen_general_forum_topic.py @@ -0,0 +1,20 @@ +from aiogram.methods import ReopenGeneralForumTopic, Request +from tests.mocked_bot import MockedBot + + +class TestReopenGeneralForumTopic: + async def test_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(ReopenGeneralForumTopic, ok=True, result=True) + + response: bool = await bot(ReopenGeneralForumTopic(chat_id=42)) + request: Request = bot.get_request() + assert request.method == "reopenGeneralForumTopic" + assert response == prepare_result.result + + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(ReopenGeneralForumTopic, ok=True, result=True) + + response: bool = await bot.reopen_general_forum_topic(chat_id=42) + request: Request = bot.get_request() + assert request.method == "reopenGeneralForumTopic" + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_restrict_chat_member.py b/tests/test_api/test_methods/test_restrict_chat_member.py index 715d0c28..ca9ee4c8 100644 --- a/tests/test_api/test_methods/test_restrict_chat_member.py +++ b/tests/test_api/test_methods/test_restrict_chat_member.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import Request, RestrictChatMember from aiogram.types import ChatPermissions from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestRestrictChatMember: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_revoke_chat_invite_link.py b/tests/test_api/test_methods/test_revoke_chat_invite_link.py index b26b5d11..84ca46b5 100644 --- a/tests/test_api/test_methods/test_revoke_chat_invite_link.py +++ b/tests/test_api/test_methods/test_revoke_chat_invite_link.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import Request, RevokeChatInviteLink from aiogram.types import ChatInviteLink, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestRevokeChatInviteLink: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_animation.py b/tests/test_api/test_methods/test_send_animation.py index 9a123f1a..5ec7f52a 100644 --- a/tests/test_api/test_methods/test_send_animation.py +++ b/tests/test_api/test_methods/test_send_animation.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendAnimation from aiogram.types import Animation, Chat, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendAnimation: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_audio.py b/tests/test_api/test_methods/test_send_audio.py index 77ad22f7..95621f10 100644 --- a/tests/test_api/test_methods/test_send_audio.py +++ b/tests/test_api/test_methods/test_send_audio.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendAudio from aiogram.types import Audio, Chat, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendAudio: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_chat_action.py b/tests/test_api/test_methods/test_send_chat_action.py index 41f9e3e4..a37568fe 100644 --- a/tests/test_api/test_methods/test_send_chat_action.py +++ b/tests/test_api/test_methods/test_send_chat_action.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.enums import ChatAction from aiogram.methods import Request, SendChatAction from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendChatAction: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_contact.py b/tests/test_api/test_methods/test_send_contact.py index adfb697e..97f6981c 100644 --- a/tests/test_api/test_methods/test_send_contact.py +++ b/tests/test_api/test_methods/test_send_contact.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendContact from aiogram.types import Chat, Contact, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendContact: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_dice.py b/tests/test_api/test_methods/test_send_dice.py index 80e618ac..3dea06c4 100644 --- a/tests/test_api/test_methods/test_send_dice.py +++ b/tests/test_api/test_methods/test_send_dice.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import Request, SendDice from aiogram.types import Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendDice: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_document.py b/tests/test_api/test_methods/test_send_document.py index 106e1737..cf758815 100644 --- a/tests/test_api/test_methods/test_send_document.py +++ b/tests/test_api/test_methods/test_send_document.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendDocument from aiogram.types import Chat, Document, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendDocument: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_game.py b/tests/test_api/test_methods/test_send_game.py index fca6753c..57ab645f 100644 --- a/tests/test_api/test_methods/test_send_game.py +++ b/tests/test_api/test_methods/test_send_game.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendGame from aiogram.types import Chat, Game, Message, PhotoSize from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendGame: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_invoice.py b/tests/test_api/test_methods/test_send_invoice.py index 6915fcc5..e88d9acf 100644 --- a/tests/test_api/test_methods/test_send_invoice.py +++ b/tests/test_api/test_methods/test_send_invoice.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendInvoice from aiogram.types import Chat, Invoice, LabeledPrice, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendInvoice: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_location.py b/tests/test_api/test_methods/test_send_location.py index 0f42cf74..7429f0b8 100644 --- a/tests/test_api/test_methods/test_send_location.py +++ b/tests/test_api/test_methods/test_send_location.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendLocation from aiogram.types import Chat, Location, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendLocation: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_media_group.py b/tests/test_api/test_methods/test_send_media_group.py index 5b6dc3e1..149937d4 100644 --- a/tests/test_api/test_methods/test_send_media_group.py +++ b/tests/test_api/test_methods/test_send_media_group.py @@ -1,8 +1,6 @@ import datetime from typing import List -import pytest - from aiogram.methods import Request, SendMediaGroup from aiogram.types import ( BufferedInputFile, @@ -15,8 +13,6 @@ from aiogram.types import ( ) from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendMediaGroup: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_message.py b/tests/test_api/test_methods/test_send_message.py index 35324f34..5ebe604a 100644 --- a/tests/test_api/test_methods/test_send_message.py +++ b/tests/test_api/test_methods/test_send_message.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendMessage from aiogram.types import Chat, ForceReply, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendMessage: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_photo.py b/tests/test_api/test_methods/test_send_photo.py index c55565f3..0e955dd1 100644 --- a/tests/test_api/test_methods/test_send_photo.py +++ b/tests/test_api/test_methods/test_send_photo.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendPhoto from aiogram.types import Chat, Message, PhotoSize from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendPhoto: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_poll.py b/tests/test_api/test_methods/test_send_poll.py index 5cbb3c75..9f67af14 100644 --- a/tests/test_api/test_methods/test_send_poll.py +++ b/tests/test_api/test_methods/test_send_poll.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendPoll from aiogram.types import Chat, Message, Poll, PollOption from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendPoll: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_sticker.py b/tests/test_api/test_methods/test_send_sticker.py index 33bce785..b19313fc 100644 --- a/tests/test_api/test_methods/test_send_sticker.py +++ b/tests/test_api/test_methods/test_send_sticker.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendSticker from aiogram.types import Chat, Message, Sticker from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendSticker: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_venue.py b/tests/test_api/test_methods/test_send_venue.py index 2f046196..6a529fcb 100644 --- a/tests/test_api/test_methods/test_send_venue.py +++ b/tests/test_api/test_methods/test_send_venue.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendVenue from aiogram.types import Chat, Location, Message, Venue from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendVenue: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_video.py b/tests/test_api/test_methods/test_send_video.py index cb1c1222..86e3c413 100644 --- a/tests/test_api/test_methods/test_send_video.py +++ b/tests/test_api/test_methods/test_send_video.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendVideo from aiogram.types import Chat, Message, Video from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendVideo: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_video_note.py b/tests/test_api/test_methods/test_send_video_note.py index 63c5bd84..e9afee41 100644 --- a/tests/test_api/test_methods/test_send_video_note.py +++ b/tests/test_api/test_methods/test_send_video_note.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendVideoNote from aiogram.types import BufferedInputFile, Chat, Message, VideoNote from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendVideoNote: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_voice.py b/tests/test_api/test_methods/test_send_voice.py index ee3894cd..917a645b 100644 --- a/tests/test_api/test_methods/test_send_voice.py +++ b/tests/test_api/test_methods/test_send_voice.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendVoice from aiogram.types import Chat, Message, Voice from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendVoice: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_chat_administrator_custom_title.py b/tests/test_api/test_methods/test_set_chat_administrator_custom_title.py index 968c805b..7581e37d 100644 --- a/tests/test_api/test_methods/test_set_chat_administrator_custom_title.py +++ b/tests/test_api/test_methods/test_set_chat_administrator_custom_title.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, SetChatAdministratorCustomTitle from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetChatTitle: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_chat_description.py b/tests/test_api/test_methods/test_set_chat_description.py index 36d05cec..0a11d7e3 100644 --- a/tests/test_api/test_methods/test_set_chat_description.py +++ b/tests/test_api/test_methods/test_set_chat_description.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, SetChatDescription from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetChatDescription: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_chat_menu_button.py b/tests/test_api/test_methods/test_set_chat_menu_button.py index 97e2fa90..74923a5f 100644 --- a/tests/test_api/test_methods/test_set_chat_menu_button.py +++ b/tests/test_api/test_methods/test_set_chat_menu_button.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import Request, SetChatMenuButton from tests.mocked_bot import MockedBot class TestSetChatMenuButton: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetChatMenuButton, ok=True, result=True) @@ -15,7 +12,6 @@ class TestSetChatMenuButton: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetChatMenuButton, ok=True, result=True) diff --git a/tests/test_api/test_methods/test_set_chat_permissions.py b/tests/test_api/test_methods/test_set_chat_permissions.py index a0278b80..73f488c1 100644 --- a/tests/test_api/test_methods/test_set_chat_permissions.py +++ b/tests/test_api/test_methods/test_set_chat_permissions.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import Request, SetChatPermissions from aiogram.types import ChatPermissions from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetChatPermissions: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_chat_photo.py b/tests/test_api/test_methods/test_set_chat_photo.py index 268f668b..e17126f6 100644 --- a/tests/test_api/test_methods/test_set_chat_photo.py +++ b/tests/test_api/test_methods/test_set_chat_photo.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import Request, SetChatPhoto from aiogram.types import BufferedInputFile from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetChatPhoto: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_chat_sticker_set.py b/tests/test_api/test_methods/test_set_chat_sticker_set.py index 311b2dd8..cba3ba1f 100644 --- a/tests/test_api/test_methods/test_set_chat_sticker_set.py +++ b/tests/test_api/test_methods/test_set_chat_sticker_set.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, SetChatStickerSet from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetChatStickerSet: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_chat_title.py b/tests/test_api/test_methods/test_set_chat_title.py index 01558d84..03f37b15 100644 --- a/tests/test_api/test_methods/test_set_chat_title.py +++ b/tests/test_api/test_methods/test_set_chat_title.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, SetChatTitle from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetChatTitle: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_game_score.py b/tests/test_api/test_methods/test_set_game_score.py index c8177625..4e739a89 100644 --- a/tests/test_api/test_methods/test_set_game_score.py +++ b/tests/test_api/test_methods/test_set_game_score.py @@ -1,13 +1,9 @@ from typing import Union -import pytest - from aiogram.methods import Request, SetGameScore from aiogram.types import Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetGameScore: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_my_commands.py b/tests/test_api/test_methods/test_set_my_commands.py index ec08bbc3..35f62e0c 100644 --- a/tests/test_api/test_methods/test_set_my_commands.py +++ b/tests/test_api/test_methods/test_set_my_commands.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import Request, SetMyCommands from aiogram.types import BotCommand from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetMyCommands: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_my_default_administrator_rights.py b/tests/test_api/test_methods/test_set_my_default_administrator_rights.py index 4bd08822..eb24a531 100644 --- a/tests/test_api/test_methods/test_set_my_default_administrator_rights.py +++ b/tests/test_api/test_methods/test_set_my_default_administrator_rights.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import Request, SetMyDefaultAdministratorRights from tests.mocked_bot import MockedBot class TestSetMyDefaultAdministratorRights: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetMyDefaultAdministratorRights, ok=True, result=True) @@ -15,7 +12,6 @@ class TestSetMyDefaultAdministratorRights: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetMyDefaultAdministratorRights, ok=True, result=True) diff --git a/tests/test_api/test_methods/test_set_passport_data_errors.py b/tests/test_api/test_methods/test_set_passport_data_errors.py index fba464f7..cdc77778 100644 --- a/tests/test_api/test_methods/test_set_passport_data_errors.py +++ b/tests/test_api/test_methods/test_set_passport_data_errors.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import Request, SetPassportDataErrors from aiogram.types import PassportElementError from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetPassportDataErrors: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_sticker_position_in_set.py b/tests/test_api/test_methods/test_set_sticker_position_in_set.py index 4de83feb..c67c7be5 100644 --- a/tests/test_api/test_methods/test_set_sticker_position_in_set.py +++ b/tests/test_api/test_methods/test_set_sticker_position_in_set.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, SetStickerPositionInSet from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetStickerPositionInSet: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_sticker_set_thumb.py b/tests/test_api/test_methods/test_set_sticker_set_thumb.py index 2ded22ee..ca1b596a 100644 --- a/tests/test_api/test_methods/test_set_sticker_set_thumb.py +++ b/tests/test_api/test_methods/test_set_sticker_set_thumb.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, SetStickerSetThumb from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetStickerSetThumb: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_webhook.py b/tests/test_api/test_methods/test_set_webhook.py index 48a67c73..cfa291c3 100644 --- a/tests/test_api/test_methods/test_set_webhook.py +++ b/tests/test_api/test_methods/test_set_webhook.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, SetWebhook from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetWebhook: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_stop_message_live_location.py b/tests/test_api/test_methods/test_stop_message_live_location.py index 4d34795b..2c1168f1 100644 --- a/tests/test_api/test_methods/test_stop_message_live_location.py +++ b/tests/test_api/test_methods/test_stop_message_live_location.py @@ -1,13 +1,9 @@ from typing import Union -import pytest - from aiogram.methods import Request, StopMessageLiveLocation from aiogram.types import Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestStopMessageLiveLocation: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_stop_poll.py b/tests/test_api/test_methods/test_stop_poll.py index e3b83bc1..7601c771 100644 --- a/tests/test_api/test_methods/test_stop_poll.py +++ b/tests/test_api/test_methods/test_stop_poll.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import Request, StopPoll from aiogram.types import Poll, PollOption from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestStopPoll: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_unban_chat_member.py b/tests/test_api/test_methods/test_unban_chat_member.py index 0139b9de..72ba662c 100644 --- a/tests/test_api/test_methods/test_unban_chat_member.py +++ b/tests/test_api/test_methods/test_unban_chat_member.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, UnbanChatMember from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestUnbanChatMember: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_unban_chat_sender_chat.py b/tests/test_api/test_methods/test_unban_chat_sender_chat.py index 4f80a5e1..4a259c62 100755 --- a/tests/test_api/test_methods/test_unban_chat_sender_chat.py +++ b/tests/test_api/test_methods/test_unban_chat_sender_chat.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import Request, UnbanChatSenderChat from tests.mocked_bot import MockedBot class TestUnbanChatSenderChat: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(UnbanChatSenderChat, ok=True, result=True) @@ -18,7 +15,6 @@ class TestUnbanChatSenderChat: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(UnbanChatSenderChat, ok=True, result=True) diff --git a/tests/test_api/test_methods/test_unhide_general_forum_topic.py b/tests/test_api/test_methods/test_unhide_general_forum_topic.py new file mode 100644 index 00000000..45fcb0c8 --- /dev/null +++ b/tests/test_api/test_methods/test_unhide_general_forum_topic.py @@ -0,0 +1,20 @@ +from aiogram.methods import Request, UnhideGeneralForumTopic +from tests.mocked_bot import MockedBot + + +class TestUnhideGeneralForumTopic: + async def test_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(UnhideGeneralForumTopic, ok=True, result=True) + + response: bool = await bot(UnhideGeneralForumTopic(chat_id=42)) + request: Request = bot.get_request() + assert request.method == "unhideGeneralForumTopic" + assert response == prepare_result.result + + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(UnhideGeneralForumTopic, ok=True, result=True) + + response: bool = await bot.unhide_general_forum_topic(chat_id=42) + request: Request = bot.get_request() + assert request.method == "unhideGeneralForumTopic" + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_unpin_all_chat_messages.py b/tests/test_api/test_methods/test_unpin_all_chat_messages.py index 24d90171..82202742 100644 --- a/tests/test_api/test_methods/test_unpin_all_chat_messages.py +++ b/tests/test_api/test_methods/test_unpin_all_chat_messages.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, UnpinAllChatMessages from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestUnpinAllChatMessages: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_unpin_all_forum_topic_messages.py b/tests/test_api/test_methods/test_unpin_all_forum_topic_messages.py index eaf64b69..445f2b4c 100644 --- a/tests/test_api/test_methods/test_unpin_all_forum_topic_messages.py +++ b/tests/test_api/test_methods/test_unpin_all_forum_topic_messages.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import Request, UnpinAllForumTopicMessages from tests.mocked_bot import MockedBot class TestUnpinAllForumTopicMessages: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(UnpinAllForumTopicMessages, ok=True, result=True) @@ -18,7 +15,6 @@ class TestUnpinAllForumTopicMessages: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(UnpinAllForumTopicMessages, ok=True, result=True) diff --git a/tests/test_api/test_methods/test_unpin_chat_message.py b/tests/test_api/test_methods/test_unpin_chat_message.py index 7a0bca41..52f8765a 100644 --- a/tests/test_api/test_methods/test_unpin_chat_message.py +++ b/tests/test_api/test_methods/test_unpin_chat_message.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, UnpinChatMessage from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestUnpinChatMessage: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_upload_sticker_file.py b/tests/test_api/test_methods/test_upload_sticker_file.py index 2a7b14ea..f8332815 100644 --- a/tests/test_api/test_methods/test_upload_sticker_file.py +++ b/tests/test_api/test_methods/test_upload_sticker_file.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import Request, UploadStickerFile from aiogram.types import BufferedInputFile, File from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestUploadStickerFile: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_types/test_input_file.py b/tests/test_api/test_types/test_input_file.py index 9317158e..05391a8e 100644 --- a/tests/test_api/test_types/test_input_file.py +++ b/tests/test_api/test_types/test_input_file.py @@ -1,13 +1,10 @@ from typing import AsyncIterable -import pytest from aresponses import ResponsesMockServer from aiogram import Bot from aiogram.types import BufferedInputFile, FSInputFile, InputFile, URLInputFile -pytestmark = pytest.mark.asyncio - class TestInputFile: def test_fs_input_file(self): diff --git a/tests/test_dispatcher/test_dispatcher.py b/tests/test_dispatcher/test_dispatcher.py index 5f06ef52..7c70ef68 100644 --- a/tests/test_dispatcher/test_dispatcher.py +++ b/tests/test_dispatcher/test_dispatcher.py @@ -34,8 +34,6 @@ from aiogram.types import ( from aiogram.types.error_event import ErrorEvent from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - async def simple_message_handler(message: Message): await asyncio.sleep(0.2) diff --git a/tests/test_dispatcher/test_event/test_event.py b/tests/test_dispatcher/test_event/test_event.py index c8f32212..3b35579c 100644 --- a/tests/test_dispatcher/test_event/test_event.py +++ b/tests/test_dispatcher/test_event/test_event.py @@ -7,8 +7,6 @@ import pytest from aiogram.dispatcher.event.event import EventObserver from aiogram.dispatcher.event.handler import HandlerObject -pytestmark = pytest.mark.asyncio - async def my_handler(value: str, index: int = 0) -> Any: return value diff --git a/tests/test_dispatcher/test_event/test_handler.py b/tests/test_dispatcher/test_event/test_handler.py index 1c787b3c..f7000d8e 100644 --- a/tests/test_dispatcher/test_event/test_handler.py +++ b/tests/test_dispatcher/test_event/test_handler.py @@ -11,8 +11,6 @@ from aiogram.handlers import BaseHandler from aiogram.types import Update from aiogram.utils.warnings import Recommendation -pytestmark = pytest.mark.asyncio - def callback1(foo: int, bar: int, baz: int): return locals() diff --git a/tests/test_dispatcher/test_event/test_telegram.py b/tests/test_dispatcher/test_event/test_telegram.py index 004cfa06..37f66357 100644 --- a/tests/test_dispatcher/test_event/test_telegram.py +++ b/tests/test_dispatcher/test_event/test_telegram.py @@ -12,9 +12,6 @@ from aiogram.dispatcher.router import Router from aiogram.filters import Filter from aiogram.types import Chat, Message, User -pytestmark = pytest.mark.asyncio - - # TODO: Test middlewares in routers tree diff --git a/tests/test_dispatcher/test_middlewares/test_user_context.py b/tests/test_dispatcher/test_middlewares/test_user_context.py index 8d289c2b..ca2abb2d 100644 --- a/tests/test_dispatcher/test_middlewares/test_user_context.py +++ b/tests/test_dispatcher/test_middlewares/test_user_context.py @@ -8,7 +8,6 @@ async def next_handler(*args, **kwargs): class TestUserContextMiddleware: - @pytest.mark.asyncio async def test_unexpected_event_type(self): with pytest.raises(RuntimeError): await UserContextMiddleware()(next_handler, object(), {}) diff --git a/tests/test_dispatcher/test_router.py b/tests/test_dispatcher/test_router.py index 66fac6c1..673bb46d 100644 --- a/tests/test_dispatcher/test_router.py +++ b/tests/test_dispatcher/test_router.py @@ -3,8 +3,6 @@ import pytest from aiogram.dispatcher.event.bases import UNHANDLED, SkipHandler, skip from aiogram.dispatcher.router import Router -pytestmark = pytest.mark.asyncio - class TestRouter: def test_including_routers(self): diff --git a/tests/test_filters/test_base.py b/tests/test_filters/test_base.py index 82780c56..36d5bbee 100644 --- a/tests/test_filters/test_base.py +++ b/tests/test_filters/test_base.py @@ -1,12 +1,8 @@ from typing import Awaitable from unittest.mock import AsyncMock, patch -import pytest - from aiogram.filters import Filter -pytestmark = pytest.mark.asyncio - class MyFilter(Filter): async def __call__(self, event: str): diff --git a/tests/test_filters/test_callback_data.py b/tests/test_filters/test_callback_data.py index 98e11357..70388689 100644 --- a/tests/test_filters/test_callback_data.py +++ b/tests/test_filters/test_callback_data.py @@ -12,8 +12,6 @@ from aiogram import F from aiogram.filters.callback_data import CallbackData from aiogram.types import CallbackQuery, User -pytestmark = pytest.mark.asyncio - class MyIntEnum(Enum): FOO = auto() diff --git a/tests/test_filters/test_chat_member_updated.py b/tests/test_filters/test_chat_member_updated.py index 42386a55..17b38762 100644 --- a/tests/test_filters/test_chat_member_updated.py +++ b/tests/test_filters/test_chat_member_updated.py @@ -267,7 +267,6 @@ class TestMemberStatusTransition: class TestChatMemberUpdatedStatusFilter: - @pytest.mark.asyncio @pytest.mark.parametrize( "transition,old,new,result", [ diff --git a/tests/test_filters/test_command.py b/tests/test_filters/test_command.py index d5301e33..1bb7d0a4 100644 --- a/tests/test_filters/test_command.py +++ b/tests/test_filters/test_command.py @@ -9,8 +9,6 @@ from aiogram.filters.command import CommandStart from aiogram.types import BotCommand, Chat, Message, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestCommandFilter: def test_commands_not_iterable(self): diff --git a/tests/test_filters/test_exception.py b/tests/test_filters/test_exception.py index 2480e76c..be056b72 100644 --- a/tests/test_filters/test_exception.py +++ b/tests/test_filters/test_exception.py @@ -7,8 +7,6 @@ from aiogram.filters import ExceptionMessageFilter, ExceptionTypeFilter from aiogram.types import Update from aiogram.types.error_event import ErrorEvent -pytestmark = pytest.mark.asyncio - class TestExceptionMessageFilter: @pytest.mark.parametrize("value", ["value", re.compile("value")]) diff --git a/tests/test_filters/test_magic_data.py b/tests/test_filters/test_magic_data.py index 1cf538c2..efc12a5f 100644 --- a/tests/test_filters/test_magic_data.py +++ b/tests/test_filters/test_magic_data.py @@ -1,4 +1,3 @@ -import pytest from magic_filter import AttrDict from aiogram import F @@ -7,7 +6,6 @@ from aiogram.types import Update class TestMagicDataFilter: - @pytest.mark.asyncio async def test_call(self): called = False diff --git a/tests/test_filters/test_state.py b/tests/test_filters/test_state.py index 2d14ab35..16124ef9 100644 --- a/tests/test_filters/test_state.py +++ b/tests/test_filters/test_state.py @@ -8,8 +8,6 @@ from aiogram.filters import StateFilter from aiogram.fsm.state import State, StatesGroup from aiogram.types import Update -pytestmark = pytest.mark.asyncio - class MyGroup(StatesGroup): state = State() @@ -40,7 +38,6 @@ class TestStateFilter: [[MyGroup, State("state")], "state", False], ], ) - @pytestmark async def test_filter(self, state, current_state, result): f = StateFilter(*state) assert bool(await f(obj=Update(update_id=42), raw_state=current_state)) is result @@ -49,11 +46,9 @@ class TestStateFilter: with pytest.raises(ValueError): StateFilter() - @pytestmark async def test_create_filter_from_state(self): FilterObject(callback=State(state="state")) - @pytestmark async def test_state_copy(self): class SG(StatesGroup): state = State() diff --git a/tests/test_filters/test_text.py b/tests/test_filters/test_text.py index fd33b02e..5d84081a 100644 --- a/tests/test_filters/test_text.py +++ b/tests/test_filters/test_text.py @@ -7,8 +7,6 @@ import pytest from aiogram.filters import Text from aiogram.types import CallbackQuery, Chat, InlineQuery, Message, Poll, PollOption, User -pytestmark = pytest.mark.asyncio - class TestText: @pytest.mark.parametrize( diff --git a/tests/test_fsm/storage/test_isolation.py b/tests/test_fsm/storage/test_isolation.py index 5f20a3c9..042cc305 100644 --- a/tests/test_fsm/storage/test_isolation.py +++ b/tests/test_fsm/storage/test_isolation.py @@ -3,8 +3,6 @@ import pytest from aiogram.fsm.storage.base import BaseEventIsolation, StorageKey from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - @pytest.fixture(name="storage_key") def create_storate_key(bot: MockedBot): diff --git a/tests/test_fsm/storage/test_redis.py b/tests/test_fsm/storage/test_redis.py index 9d10e295..8d320e27 100644 --- a/tests/test_fsm/storage/test_redis.py +++ b/tests/test_fsm/storage/test_redis.py @@ -3,8 +3,6 @@ import pytest from aiogram.fsm.storage.base import DEFAULT_DESTINY, StorageKey from aiogram.fsm.storage.redis import DefaultKeyBuilder, RedisEventIsolation, RedisStorage -pytestmark = pytest.mark.asyncio - PREFIX = "test" BOT_ID = 42 CHAT_ID = -1 diff --git a/tests/test_fsm/storage/test_storages.py b/tests/test_fsm/storage/test_storages.py index ac456251..83871722 100644 --- a/tests/test_fsm/storage/test_storages.py +++ b/tests/test_fsm/storage/test_storages.py @@ -3,8 +3,6 @@ import pytest from aiogram.fsm.storage.base import BaseStorage, StorageKey from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - @pytest.fixture(name="storage_key") def create_storate_key(bot: MockedBot): diff --git a/tests/test_fsm/test_context.py b/tests/test_fsm/test_context.py index 836c2081..5c31373c 100644 --- a/tests/test_fsm/test_context.py +++ b/tests/test_fsm/test_context.py @@ -5,8 +5,6 @@ from aiogram.fsm.storage.base import StorageKey from aiogram.fsm.storage.memory import MemoryStorage from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - @pytest.fixture() def state(bot: MockedBot): diff --git a/tests/test_handler/test_base.py b/tests/test_handler/test_base.py index 96cdea00..f79a6a6b 100644 --- a/tests/test_handler/test_base.py +++ b/tests/test_handler/test_base.py @@ -10,8 +10,6 @@ from aiogram.dispatcher.event.handler import HandlerObject from aiogram.handlers import BaseHandler from aiogram.types import Chat, Message, Update -pytestmark = pytest.mark.asyncio - class MyHandler(BaseHandler): async def handle(self) -> Any: diff --git a/tests/test_handler/test_callback_query.py b/tests/test_handler/test_callback_query.py index 345d098f..93ac9498 100644 --- a/tests/test_handler/test_callback_query.py +++ b/tests/test_handler/test_callback_query.py @@ -1,12 +1,8 @@ from typing import Any -import pytest - from aiogram.handlers import CallbackQueryHandler from aiogram.types import CallbackQuery, User -pytestmark = pytest.mark.asyncio - class TestCallbackQueryHandler: async def test_attributes_aliases(self): diff --git a/tests/test_handler/test_chat_member.py b/tests/test_handler/test_chat_member.py index 85562c7c..f343b247 100644 --- a/tests/test_handler/test_chat_member.py +++ b/tests/test_handler/test_chat_member.py @@ -1,13 +1,9 @@ import datetime from typing import Any -import pytest - from aiogram.handlers import ChatMemberHandler from aiogram.types import Chat, ChatMemberMember, ChatMemberUpdated, User -pytestmark = pytest.mark.asyncio - class TestChatMemberUpdated: async def test_attributes_aliases(self): diff --git a/tests/test_handler/test_chosen_inline_result.py b/tests/test_handler/test_chosen_inline_result.py index 3e1c09bc..62ac8aa7 100644 --- a/tests/test_handler/test_chosen_inline_result.py +++ b/tests/test_handler/test_chosen_inline_result.py @@ -1,12 +1,8 @@ from typing import Any -import pytest - from aiogram.handlers import ChosenInlineResultHandler from aiogram.types import ChosenInlineResult, User -pytestmark = pytest.mark.asyncio - class TestChosenInlineResultHandler: async def test_attributes_aliases(self): diff --git a/tests/test_handler/test_error.py b/tests/test_handler/test_error.py index 4d1dc3aa..fb9d88bf 100644 --- a/tests/test_handler/test_error.py +++ b/tests/test_handler/test_error.py @@ -1,11 +1,7 @@ from typing import Any -import pytest - from aiogram.handlers import ErrorHandler -pytestmark = pytest.mark.asyncio - class TestErrorHandler: async def test_extensions(self): diff --git a/tests/test_handler/test_inline_query.py b/tests/test_handler/test_inline_query.py index 8201db33..d1bb7037 100644 --- a/tests/test_handler/test_inline_query.py +++ b/tests/test_handler/test_inline_query.py @@ -1,12 +1,8 @@ from typing import Any -import pytest - from aiogram.handlers import InlineQueryHandler from aiogram.types import InlineQuery, User -pytestmark = pytest.mark.asyncio - class TestCallbackQueryHandler: async def test_attributes_aliases(self): diff --git a/tests/test_handler/test_message.py b/tests/test_handler/test_message.py index eef3be01..7b5581a4 100644 --- a/tests/test_handler/test_message.py +++ b/tests/test_handler/test_message.py @@ -1,14 +1,10 @@ import datetime from typing import Any -import pytest - from aiogram.filters import CommandObject from aiogram.handlers import MessageHandler, MessageHandlerCommandMixin from aiogram.types import Chat, Message, User -pytestmark = pytest.mark.asyncio - class MyHandler(MessageHandler): async def handle(self) -> Any: diff --git a/tests/test_handler/test_poll.py b/tests/test_handler/test_poll.py index 4d4c2835..b070874d 100644 --- a/tests/test_handler/test_poll.py +++ b/tests/test_handler/test_poll.py @@ -1,12 +1,8 @@ from typing import Any -import pytest - from aiogram.handlers import PollHandler from aiogram.types import Poll, PollOption -pytestmark = pytest.mark.asyncio - class TestShippingQueryHandler: async def test_attributes_aliases(self): diff --git a/tests/test_handler/test_pre_checkout_query.py b/tests/test_handler/test_pre_checkout_query.py index 26b26f81..c764bf91 100644 --- a/tests/test_handler/test_pre_checkout_query.py +++ b/tests/test_handler/test_pre_checkout_query.py @@ -1,12 +1,8 @@ from typing import Any -import pytest - from aiogram.handlers import PreCheckoutQueryHandler from aiogram.types import PreCheckoutQuery, User -pytestmark = pytest.mark.asyncio - class TestPreCheckoutQueryHandler: async def test_attributes_aliases(self): diff --git a/tests/test_handler/test_shipping_query.py b/tests/test_handler/test_shipping_query.py index 7113cdef..51ba6b96 100644 --- a/tests/test_handler/test_shipping_query.py +++ b/tests/test_handler/test_shipping_query.py @@ -1,12 +1,8 @@ from typing import Any -import pytest - from aiogram.handlers import ShippingQueryHandler from aiogram.types import ShippingAddress, ShippingQuery, User -pytestmark = pytest.mark.asyncio - class TestShippingQueryHandler: async def test_attributes_aliases(self): diff --git a/tests/test_utils/test_backoff.py b/tests/test_utils/test_backoff.py index b409e22a..57e7269f 100644 --- a/tests/test_utils/test_backoff.py +++ b/tests/test_utils/test_backoff.py @@ -3,7 +3,6 @@ import pytest from aiogram.utils.backoff import Backoff, BackoffConfig BACKOFF_CONFIG = BackoffConfig(min_delay=0.1, max_delay=1.0, factor=2.0, jitter=0.0) -pytestmark = pytest.mark.asyncio class TestBackoffConfig: diff --git a/tests/test_utils/test_chat_action.py b/tests/test_utils/test_chat_action.py index 21182968..517b8e90 100644 --- a/tests/test_utils/test_chat_action.py +++ b/tests/test_utils/test_chat_action.py @@ -11,8 +11,6 @@ from aiogram.types import Chat, Message, User from aiogram.utils.chat_action import ChatActionMiddleware, ChatActionSender from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestChatActionSender: async def test_wait(self, bot: Bot, loop: asyncio.BaseEventLoop): diff --git a/tests/test_utils/test_deep_linking.py b/tests/test_utils/test_deep_linking.py index 78dce6a3..3c1dbec2 100644 --- a/tests/test_utils/test_deep_linking.py +++ b/tests/test_utils/test_deep_linking.py @@ -22,8 +22,6 @@ WRONG_PAYLOADS = [ 1234567890123456789.0, ] -pytestmark = pytest.mark.asyncio - @pytest.fixture(params=PAYLOADS, name="payload") def payload_fixture(request): diff --git a/tests/test_utils/test_i18n.py b/tests/test_utils/test_i18n.py index aa6f9516..d31dac9e 100644 --- a/tests/test_utils/test_i18n.py +++ b/tests/test_utils/test_i18n.py @@ -87,7 +87,6 @@ async def next_call(event, data): return gettext("test") -@pytest.mark.asyncio class TestSimpleI18nMiddleware: @pytest.mark.parametrize( "event_from_user,result", @@ -133,7 +132,6 @@ class TestSimpleI18nMiddleware: assert locale == i18n.default_locale -@pytest.mark.asyncio class TestConstI18nMiddleware: async def test_middleware(self, i18n: I18n): middleware = ConstI18nMiddleware(i18n=i18n, locale="uk") @@ -145,7 +143,6 @@ class TestConstI18nMiddleware: assert result == "ั‚ะตัั‚" -@pytest.mark.asyncio class TestFSMI18nMiddleware: async def test_middleware(self, i18n: I18n, bot: MockedBot): middleware = FSMI18nMiddleware(i18n=i18n)