From 247ffbef69360235239d4eea486494acd2dd3291 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sat, 25 Jun 2022 18:14:29 +0300 Subject: [PATCH] 3.x Bot API 6.1 (#937) Added support of Bot API 6.1 --- .apiversion | 2 +- CHANGES/936.misc.rst | 1 + README.rst | 2 +- aiogram/__init__.py | 4 +- aiogram/client/bot.py | 166 +++-- aiogram/methods/__init__.py | 2 + aiogram/methods/add_sticker_to_set.py | 2 +- aiogram/methods/answer_callback_query.py | 4 +- aiogram/methods/answer_web_app_query.py | 2 + aiogram/methods/create_chat_invite_link.py | 2 +- aiogram/methods/create_invoice_link.py | 65 ++ aiogram/methods/create_new_sticker_set.py | 4 +- aiogram/methods/edit_chat_invite_link.py | 2 +- aiogram/methods/edit_message_live_location.py | 2 +- aiogram/methods/get_file.py | 4 +- aiogram/methods/get_game_high_scores.py | 2 +- aiogram/methods/send_animation.py | 4 +- aiogram/methods/send_audio.py | 4 +- aiogram/methods/send_document.py | 4 +- aiogram/methods/send_game.py | 2 +- aiogram/methods/send_invoice.py | 10 +- aiogram/methods/send_photo.py | 2 +- aiogram/methods/send_sticker.py | 2 +- aiogram/methods/send_video.py | 6 +- aiogram/methods/send_video_note.py | 6 +- aiogram/methods/send_voice.py | 2 +- aiogram/methods/set_chat_menu_button.py | 2 +- aiogram/methods/set_sticker_set_thumb.py | 2 +- aiogram/methods/set_webhook.py | 14 +- aiogram/methods/upload_sticker_file.py | 2 +- aiogram/types/animation.py | 2 +- aiogram/types/audio.py | 2 +- aiogram/types/callback_query.py | 2 +- aiogram/types/chat.py | 8 +- aiogram/types/chat_invite_link.py | 2 +- aiogram/types/chosen_inline_result.py | 2 +- aiogram/types/document.py | 2 +- aiogram/types/encrypted_credentials.py | 2 +- aiogram/types/encrypted_passport_element.py | 2 +- aiogram/types/file.py | 4 +- aiogram/types/force_reply.py | 2 +- aiogram/types/inline_keyboard_button.py | 8 +- aiogram/types/inline_query.py | 2 +- .../inline_query_result_cached_mpeg4_gif.py | 2 +- aiogram/types/inline_query_result_document.py | 2 +- .../types/inline_query_result_mpeg4_gif.py | 2 +- aiogram/types/inline_query_result_video.py | 2 +- .../types/input_invoice_message_content.py | 10 +- aiogram/types/input_media_animation.py | 4 +- aiogram/types/input_media_audio.py | 4 +- aiogram/types/input_media_document.py | 4 +- aiogram/types/input_media_photo.py | 2 +- aiogram/types/input_media_video.py | 4 +- aiogram/types/keyboard_button.py | 2 +- aiogram/types/location.py | 2 +- aiogram/types/message.py | 10 +- aiogram/types/message_entity.py | 2 +- aiogram/types/passport_data.py | 2 +- aiogram/types/pre_checkout_query.py | 2 +- aiogram/types/reply_keyboard_markup.py | 2 +- aiogram/types/response_parameters.py | 2 +- aiogram/types/sent_web_app_message.py | 2 +- aiogram/types/shipping_address.py | 2 +- aiogram/types/sticker.py | 3 + aiogram/types/successful_payment.py | 2 +- aiogram/types/update.py | 6 +- aiogram/types/user.py | 4 + aiogram/types/video.py | 4 +- aiogram/types/voice.py | 2 +- aiogram/types/web_app_data.py | 4 +- aiogram/types/web_app_info.py | 2 +- aiogram/types/webhook_info.py | 8 +- aiogram/utils/i18n/core.py | 2 +- docs/api/methods/add_sticker_to_set.rst | 7 - docs/api/methods/answer_callback_query.rst | 7 - docs/api/methods/answer_inline_query.rst | 7 - .../api/methods/answer_pre_checkout_query.rst | 7 - docs/api/methods/answer_shipping_query.rst | 7 - docs/api/methods/answer_web_app_query.rst | 7 - .../api/methods/approve_chat_join_request.rst | 7 - docs/api/methods/ban_chat_member.rst | 7 - docs/api/methods/ban_chat_sender_chat.rst | 7 - docs/api/methods/close.rst | 7 - docs/api/methods/copy_message.rst | 7 - docs/api/methods/create_chat_invite_link.rst | 7 - docs/api/methods/create_invoice_link.rst | 44 ++ docs/api/methods/create_new_sticker_set.rst | 7 - .../api/methods/decline_chat_join_request.rst | 7 - docs/api/methods/delete_chat_photo.rst | 7 - docs/api/methods/delete_chat_sticker_set.rst | 7 - docs/api/methods/delete_message.rst | 7 - docs/api/methods/delete_my_commands.rst | 7 - docs/api/methods/delete_sticker_from_set.rst | 7 - docs/api/methods/delete_webhook.rst | 7 - docs/api/methods/edit_chat_invite_link.rst | 7 - docs/api/methods/edit_message_caption.rst | 7 - .../methods/edit_message_live_location.rst | 7 - docs/api/methods/edit_message_media.rst | 7 - .../api/methods/edit_message_reply_markup.rst | 7 - docs/api/methods/edit_message_text.rst | 7 - docs/api/methods/export_chat_invite_link.rst | 7 - docs/api/methods/forward_message.rst | 7 - docs/api/methods/get_chat.rst | 7 - docs/api/methods/get_chat_administrators.rst | 7 - docs/api/methods/get_chat_member.rst | 7 - docs/api/methods/get_chat_member_count.rst | 7 - docs/api/methods/get_chat_members_count.rst | 7 - docs/api/methods/get_chat_menu_button.rst | 7 - docs/api/methods/get_file.rst | 7 - docs/api/methods/get_game_high_scores.rst | 7 - docs/api/methods/get_me.rst | 7 - docs/api/methods/get_my_commands.rst | 7 - .../get_my_default_administrator_rights.rst | 7 - docs/api/methods/get_sticker_set.rst | 7 - docs/api/methods/get_updates.rst | 7 - docs/api/methods/get_user_profile_photos.rst | 7 - docs/api/methods/get_webhook_info.rst | 7 - docs/api/methods/index.rst | 1 + docs/api/methods/kick_chat_member.rst | 7 - docs/api/methods/leave_chat.rst | 7 - docs/api/methods/log_out.rst | 7 - docs/api/methods/pin_chat_message.rst | 7 - docs/api/methods/promote_chat_member.rst | 7 - docs/api/methods/restrict_chat_member.rst | 7 - docs/api/methods/revoke_chat_invite_link.rst | 7 - docs/api/methods/send_animation.rst | 7 - docs/api/methods/send_audio.rst | 7 - docs/api/methods/send_contact.rst | 7 - docs/api/methods/send_dice.rst | 7 - docs/api/methods/send_document.rst | 7 - docs/api/methods/send_game.rst | 7 - docs/api/methods/send_invoice.rst | 7 - docs/api/methods/send_location.rst | 7 - docs/api/methods/send_media_group.rst | 7 - docs/api/methods/send_message.rst | 7 - docs/api/methods/send_photo.rst | 7 - docs/api/methods/send_poll.rst | 7 - docs/api/methods/send_sticker.rst | 7 - docs/api/methods/send_venue.rst | 7 - docs/api/methods/send_video.rst | 7 - docs/api/methods/send_video_note.rst | 7 - docs/api/methods/send_voice.rst | 7 - .../set_chat_administrator_custom_title.rst | 7 - docs/api/methods/set_chat_description.rst | 7 - docs/api/methods/set_chat_menu_button.rst | 7 - docs/api/methods/set_chat_permissions.rst | 7 - docs/api/methods/set_chat_photo.rst | 7 - poetry.lock | 598 +++++------------- pyproject.toml | 24 +- .../test_methods/test_create_invoice_link.py | 43 ++ 150 files changed, 571 insertions(+), 1112 deletions(-) create mode 100644 CHANGES/936.misc.rst create mode 100644 aiogram/methods/create_invoice_link.py create mode 100644 docs/api/methods/create_invoice_link.rst create mode 100644 tests/test_api/test_methods/test_create_invoice_link.py diff --git a/.apiversion b/.apiversion index e0ea36fe..a435f5a5 100644 --- a/.apiversion +++ b/.apiversion @@ -1 +1 @@ -6.0 +6.1 diff --git a/CHANGES/936.misc.rst b/CHANGES/936.misc.rst new file mode 100644 index 00000000..0d48256c --- /dev/null +++ b/CHANGES/936.misc.rst @@ -0,0 +1 @@ +Added full support of `Bot API 6.1 `_ diff --git a/README.rst b/README.rst index df29b800..d0ad453c 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.0-blue.svg?logo=telegram +.. image:: https://img.shields.io/badge/Telegram%20Bot%20API-6.1-blue.svg?logo=telegram :target: https://core.telegram.org/bots/api :alt: Telegram Bot API diff --git a/aiogram/__init__.py b/aiogram/__init__.py index 50973dd6..221b53e4 100644 --- a/aiogram/__init__.py +++ b/aiogram/__init__.py @@ -39,5 +39,5 @@ __all__ = ( "flags", ) -__version__ = "3.0.0b3" -__api_version__ = "6.0" +__version__ = "3.0.0b4" +__api_version__ = "6.1" diff --git a/aiogram/client/bot.py b/aiogram/client/bot.py index 16453574..e860a796 100644 --- a/aiogram/client/bot.py +++ b/aiogram/client/bot.py @@ -34,6 +34,7 @@ from ..methods import ( Close, CopyMessage, CreateChatInviteLink, + CreateInvoiceLink, CreateNewStickerSet, DeclineChatJoinRequest, DeleteChatPhoto, @@ -413,11 +414,12 @@ class Bot(ContextInstanceMixin["Bot"]): max_connections: Optional[int] = None, allowed_updates: Optional[List[str]] = None, drop_pending_updates: Optional[bool] = None, + secret_token: Optional[str] = None, request_timeout: Optional[int] = None, ) -> bool: """ - Use this method to specify a url and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified url, containing a JSON-serialized :class:`aiogram.types.update.Update`. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns :code:`True` on success. - If you'd like to make sure that the Webhook request comes from Telegram, we recommend using a secret path in the URL, e.g. :code:`https://www.example.com/`. Since nobody else knows your bot's token, you can be pretty sure it's us. + Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized :class:`aiogram.types.update.Update`. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns :code:`True` on success. + If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter *secret_token*. If specified, the request will contain a header 'X-Telegram-Bot-Api-Secret-Token' with the secret token as content. **Notes** @@ -425,17 +427,18 @@ class Bot(ContextInstanceMixin["Bot"]): **2.** To use a self-signed certificate, you need to upload your `public key certificate `_ using *certificate* parameter. Please upload as InputFile, sending a String will not work. - **3.** Ports currently supported *for Webhooks*: **443, 80, 88, 8443**. - **NEW!** If you're having any trouble setting up webhooks, please check out this `amazing guide to Webhooks `_. + **3.** Ports currently supported *for webhooks*: **443, 80, 88, 8443**. + If you're having any trouble setting up webhooks, please check out this `amazing guide to webhooks `_. Source: https://core.telegram.org/bots/api#setwebhook - :param url: HTTPS url to send updates to. Use an empty string to remove webhook integration + :param url: HTTPS URL to send updates to. Use an empty string to remove webhook integration :param certificate: Upload your public key certificate so that the root certificate in use can be checked. See our `self-signed guide `_ for details. :param ip_address: The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS - :param max_connections: Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to *40*. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput. + :param max_connections: The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to *40*. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput. :param allowed_updates: A JSON-serialized list of the update types you want your bot to receive. For example, specify ['message', 'edited_channel_post', 'callback_query'] to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member* (default). If not specified, the previous setting will be used. :param drop_pending_updates: Pass :code:`True` to drop all pending updates + :param secret_token: A secret token to be sent in a header 'X-Telegram-Bot-Api-Secret-Token' in every webhook request, 1-256 characters. Only characters :code:`A-Z`, :code:`a-z`, :code:`0-9`, :code:`_` and :code:`-` are allowed. The header is useful to ensure that the request comes from a webhook set by you. :param request_timeout: Request timeout :return: Returns True on success. """ @@ -446,6 +449,7 @@ class Bot(ContextInstanceMixin["Bot"]): max_connections=max_connections, allowed_updates=allowed_updates, drop_pending_updates=drop_pending_updates, + secret_token=secret_token, ) return await self(call, request_timeout=request_timeout) @@ -687,7 +691,7 @@ class Bot(ContextInstanceMixin["Bot"]): Source: https://core.telegram.org/bots/api#sendphoto :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More info on Sending Files » ` + :param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files » ` :param 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* @@ -740,14 +744,14 @@ class Bot(ContextInstanceMixin["Bot"]): Source: https://core.telegram.org/bots/api#sendaudio :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More info on Sending Files » ` + :param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param caption: Audio caption, 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the audio caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* :param duration: Duration of the audio in seconds :param performer: Performer :param title: Track name - :param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More info on Sending Files » ` + :param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_to_message_id: If the message is a reply, ID of the original message @@ -798,8 +802,8 @@ class Bot(ContextInstanceMixin["Bot"]): Source: https://core.telegram.org/bots/api#senddocument :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More info on Sending Files » ` - :param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More info on Sending Files » ` + :param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` + :param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` :param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the document caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* @@ -850,16 +854,16 @@ class Bot(ContextInstanceMixin["Bot"]): request_timeout: Optional[int] = None, ) -> Message: """ - Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. + Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. Source: https://core.telegram.org/bots/api#sendvideo :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More info on Sending Files » ` + :param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files » ` :param duration: Duration of sent video in seconds :param width: Video width :param height: Video height - :param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More info on Sending Files » ` + :param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the video caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* @@ -917,11 +921,11 @@ class Bot(ContextInstanceMixin["Bot"]): Source: https://core.telegram.org/bots/api#sendanimation :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More info on Sending Files » ` + :param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files » ` :param duration: Duration of sent animation in seconds :param width: Animation width :param height: Animation height - :param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More info on Sending Files » ` + :param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` :param caption: Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the animation caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* @@ -974,7 +978,7 @@ class Bot(ContextInstanceMixin["Bot"]): Source: https://core.telegram.org/bots/api#sendvoice :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More info on Sending Files » ` + :param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param caption: Voice message caption, 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the voice message caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* @@ -1019,15 +1023,15 @@ class Bot(ContextInstanceMixin["Bot"]): request_timeout: Optional[int] = None, ) -> Message: """ - As of `v.4.0 `_, Telegram clients support rounded square mp4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent :class:`aiogram.types.message.Message` is returned. + As of `v.4.0 `_, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent :class:`aiogram.types.message.Message` is returned. Source: https://core.telegram.org/bots/api#sendvideonote :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More info on Sending Files » `. Sending video notes by a URL is currently unsupported + :param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » `. Sending video notes by a URL is currently unsupported :param duration: Duration of sent video in seconds :param length: Video width and height, i.e. diameter of the video message - :param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More info on Sending Files » ` + :param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_to_message_id: If the message is a reply, ID of the original message @@ -1163,7 +1167,7 @@ class Bot(ContextInstanceMixin["Bot"]): :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500 :param heading: Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. - :param proximity_alert_radius: Maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. + :param proximity_alert_radius: The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. :param reply_markup: A JSON-serialized object for a new `inline keyboard `_. :param request_timeout: Request timeout :return: On success, if the edited message is not an inline message, the edited Message is @@ -1487,12 +1491,12 @@ class Bot(ContextInstanceMixin["Bot"]): request_timeout: Optional[int] = None, ) -> File: """ - Use this method to get basic info about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a :class:`aiogram.types.file.File` object is returned. The file can then be downloaded via the link :code:`https://api.telegram.org/file/bot/`, where :code:`` is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling :class:`aiogram.methods.get_file.GetFile` again. + Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a :class:`aiogram.types.file.File` object is returned. The file can then be downloaded via the link :code:`https://api.telegram.org/file/bot/`, where :code:`` is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling :class:`aiogram.methods.get_file.GetFile` again. **Note:** This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received. Source: https://core.telegram.org/bots/api#getfile - :param file_id: File identifier to get info about + :param file_id: File identifier to get information about :param request_timeout: Request timeout :return: On success, a File object is returned. """ @@ -1801,7 +1805,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 name: Invite link name; 0-32 characters :param expire_date: Point in time (Unix timestamp) when the link will expire - :param member_limit: Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 + :param member_limit: The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 :param creates_join_request: :code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified :param request_timeout: Request timeout :return: Returns the new invite link as ChatInviteLink object. @@ -1834,7 +1838,7 @@ class Bot(ContextInstanceMixin["Bot"]): :param invite_link: The invite link to edit :param name: Invite link name; 0-32 characters :param expire_date: Point in time (Unix timestamp) when the link will expire - :param member_limit: Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 + :param member_limit: The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 :param creates_join_request: :code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified :param request_timeout: Request timeout :return: Returns the edited invite link as a ChatInviteLink object. @@ -2261,14 +2265,14 @@ class Bot(ContextInstanceMixin["Bot"]): """ Use this method to send answers to callback queries sent from `inline keyboards `_. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, :code:`True` is returned. - Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via `@Botfather `_ and accept the terms. Otherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that open your bot with a parameter. + Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via `@BotFather `_ and accept the terms. Otherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that open your bot with a parameter. Source: https://core.telegram.org/bots/api#answercallbackquery :param callback_query_id: Unique identifier for the query to be answered :param text: Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters :param show_alert: If :code:`True`, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to *false*. - :param url: URL that will be opened by the user's client. If you have created a :class:`aiogram.types.game.Game` and accepted the conditions via `@Botfather `_, specify the URL that opens your game — note that this will only work if the query comes from a `https://core.telegram.org/bots/api#inlinekeyboardbutton `_ *callback_game* button. + :param url: URL that will be opened by the user's client. If you have created a :class:`aiogram.types.game.Game` and accepted the conditions via `@BotFather `_, specify the URL that opens your game - note that this will only work if the query comes from a `https://core.telegram.org/bots/api#inlinekeyboardbutton `_ *callback_game* button. :param cache_time: The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0. :param request_timeout: Request timeout :return: On success, True is returned. @@ -2364,7 +2368,7 @@ class Bot(ContextInstanceMixin["Bot"]): Source: https://core.telegram.org/bots/api#setchatmenubutton :param chat_id: Unique identifier for the target private chat. If not specified, default bot's menu button will be changed - :param menu_button: A JSON-serialized object for the new bot's menu button. Defaults to :class:`aiogram.types.menu_button_default.MenuButtonDefault` + :param menu_button: A JSON-serialized object for the bot's new menu button. Defaults to :class:`aiogram.types.menu_button_default.MenuButtonDefault` :param request_timeout: Request timeout :return: Returns True on success. """ @@ -2666,7 +2670,7 @@ class Bot(ContextInstanceMixin["Bot"]): Source: https://core.telegram.org/bots/api#sendsticker :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP file from the Internet, or upload a new one using multipart/form-data. :ref:`More info on Sending Files » ` + :param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_to_message_id: If the message is a reply, ID of the original message @@ -2717,7 +2721,7 @@ class Bot(ContextInstanceMixin["Bot"]): Source: https://core.telegram.org/bots/api#uploadstickerfile :param user_id: User identifier of sticker file owner - :param png_sticker: **PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. :ref:`More info on Sending Files » ` + :param png_sticker: **PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. :ref:`More information on Sending Files » ` :param request_timeout: Request timeout :return: Returns the uploaded File on success. """ @@ -2746,10 +2750,10 @@ class Bot(ContextInstanceMixin["Bot"]): Source: https://core.telegram.org/bots/api#createnewstickerset :param user_id: User identifier of created sticker set owner - :param name: Short name of sticker set, to be used in :code:`t.me/addstickers/` URLs (e.g., *animals*). Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in :code:`"_by_"`. :code:`` is case insensitive. 1-64 characters. + :param name: Short name of sticker set, to be used in :code:`t.me/addstickers/` URLs (e.g., *animals*). Can contain only English letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in :code:`"_by_"`. :code:`` is case insensitive. 1-64 characters. :param title: Sticker set title, 1-64 characters :param emojis: One or more emoji corresponding to the sticker - :param png_sticker: **PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More info on Sending Files » ` + :param png_sticker: **PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param tgs_sticker: **TGS** animation with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for technical requirements :param webm_sticker: **WEBM** video with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for technical requirements :param contains_masks: Pass :code:`True`, if a set of mask stickers should be created @@ -2789,7 +2793,7 @@ class Bot(ContextInstanceMixin["Bot"]): :param user_id: User identifier of sticker set owner :param name: Sticker set name :param emojis: One or more emoji corresponding to the sticker - :param png_sticker: **PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More info on Sending Files » ` + :param png_sticker: **PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` :param tgs_sticker: **TGS** animation with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for technical requirements :param webm_sticker: **WEBM** video with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for technical requirements :param mask_position: A JSON-serialized object for position where the mask should be placed on faces @@ -2862,7 +2866,7 @@ class Bot(ContextInstanceMixin["Bot"]): :param name: Sticker set name :param user_id: User identifier of the sticker set owner - :param thumb: A **PNG** image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a **TGS** animation with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for animated sticker technical requirements, or a **WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More info on Sending Files » `. Animated sticker set thumbnails can't be uploaded via HTTP URL. + :param thumb: A **PNG** image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a **TGS** animation with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for animated sticker technical requirements, or a **WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » `. Animated sticker set thumbnails can't be uploaded via HTTP URL. :param request_timeout: Request timeout :return: Returns True on success. """ @@ -2984,23 +2988,23 @@ class Bot(ContextInstanceMixin["Bot"]): :param title: Product name, 1-32 characters :param description: Product description, 1-255 characters :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. - :param provider_token: Payments provider token, obtained via `Botfather `_ + :param provider_token: Payment provider token, obtained via `@BotFather `_ :param currency: Three-letter ISO 4217 currency code, see `more on currencies `_ :param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) :param max_tip_amount: The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0 :param suggested_tip_amounts: A JSON-serialized array of suggested amounts of tips in the *smallest units* of the currency (integer, **not** float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed *max_tip_amount*. :param start_parameter: Unique deep-linking parameter. If left empty, **forwarded copies** of the sent message will have a *Pay* button, allowing multiple users to pay directly from the forwarded message, using the same invoice. If non-empty, forwarded copies of the sent message will have a *URL* button with a deep link to the bot (instead of a *Pay* button), with the value used as the start parameter - :param provider_data: A JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider. + :param provider_data: JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider. :param photo_url: URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for. - :param photo_size: Photo size + :param photo_size: Photo size in bytes :param photo_width: Photo width :param photo_height: Photo height :param need_name: Pass :code:`True`, if you require the user's full name to complete the order :param need_phone_number: Pass :code:`True`, if you require the user's phone number to complete the order :param need_email: Pass :code:`True`, if you require the user's email address to complete the order :param need_shipping_address: Pass :code:`True`, if you require the user's shipping address to complete the order - :param send_phone_number_to_provider: Pass :code:`True`, if user's phone number should be sent to provider - :param send_email_to_provider: Pass :code:`True`, if user's email address should be sent to provider + :param send_phone_number_to_provider: Pass :code:`True`, if the user's phone number should be sent to provider + :param send_email_to_provider: Pass :code:`True`, if the user's email address should be sent to provider :param is_flexible: Pass :code:`True`, if the final price depends on the shipping method :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving @@ -3041,6 +3045,82 @@ class Bot(ContextInstanceMixin["Bot"]): ) return await self(call, request_timeout=request_timeout) + async def create_invoice_link( + self, + title: str, + description: str, + payload: str, + provider_token: str, + currency: str, + prices: List[LabeledPrice], + max_tip_amount: Optional[int] = None, + suggested_tip_amounts: Optional[List[int]] = None, + provider_data: Optional[str] = None, + photo_url: Optional[str] = None, + photo_size: Optional[int] = None, + photo_width: Optional[int] = None, + photo_height: Optional[int] = None, + need_name: Optional[bool] = None, + need_phone_number: Optional[bool] = None, + need_email: Optional[bool] = None, + need_shipping_address: Optional[bool] = None, + send_phone_number_to_provider: Optional[bool] = None, + send_email_to_provider: Optional[bool] = None, + is_flexible: Optional[bool] = None, + request_timeout: Optional[int] = None, + ) -> str: + """ + Use this method to create a link for an invoice. Returns the created invoice link as *String* on success. + + Source: https://core.telegram.org/bots/api#createinvoicelink + + :param title: Product name, 1-32 characters + :param description: Product description, 1-255 characters + :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. + :param provider_token: Payment provider token, obtained via `BotFather `_ + :param currency: Three-letter ISO 4217 currency code, see `more on currencies `_ + :param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) + :param max_tip_amount: The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0 + :param suggested_tip_amounts: A JSON-serialized array of suggested amounts of tips in the *smallest units* of the currency (integer, **not** float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed *max_tip_amount*. + :param provider_data: JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider. + :param photo_url: URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. + :param photo_size: Photo size in bytes + :param photo_width: Photo width + :param photo_height: Photo height + :param need_name: Pass :code:`True`, if you require the user's full name to complete the order + :param need_phone_number: Pass :code:`True`, if you require the user's phone number to complete the order + :param need_email: Pass :code:`True`, if you require the user's email address to complete the order + :param need_shipping_address: Pass :code:`True`, if you require the user's shipping address to complete the order + :param send_phone_number_to_provider: Pass :code:`True`, if the user's phone number should be sent to the provider + :param send_email_to_provider: Pass :code:`True`, if the user's email address should be sent to the provider + :param is_flexible: Pass :code:`True`, if the final price depends on the shipping method + :param request_timeout: Request timeout + :return: Returns the created invoice link as String on success. + """ + call = CreateInvoiceLink( + title=title, + description=description, + payload=payload, + provider_token=provider_token, + currency=currency, + prices=prices, + max_tip_amount=max_tip_amount, + suggested_tip_amounts=suggested_tip_amounts, + provider_data=provider_data, + photo_url=photo_url, + photo_size=photo_size, + photo_width=photo_width, + photo_height=photo_height, + need_name=need_name, + need_phone_number=need_phone_number, + need_email=need_email, + need_shipping_address=need_shipping_address, + send_phone_number_to_provider=send_phone_number_to_provider, + send_email_to_provider=send_email_to_provider, + is_flexible=is_flexible, + ) + return await self(call, request_timeout=request_timeout) + async def answer_shipping_query( self, shipping_query_id: str, @@ -3146,7 +3226,7 @@ class Bot(ContextInstanceMixin["Bot"]): Source: https://core.telegram.org/bots/api#sendgame :param chat_id: Unique identifier for the target chat - :param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `Botfather `_. + :param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_. :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_to_message_id: If the message is a reply, ID of the original message @@ -3216,7 +3296,7 @@ class Bot(ContextInstanceMixin["Bot"]): """ Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. On success, returns an *Array* of :class:`aiogram.types.game_high_score.GameHighScore` objects. - This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and his neighbors are not among them. Please note that this behavior is subject to change. + This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and their neighbors are not among them. Please note that this behavior is subject to change. Source: https://core.telegram.org/bots/api#getgamehighscores @@ -3228,8 +3308,8 @@ class Bot(ContextInstanceMixin["Bot"]): :return: Will return the score of the specified user and several of their neighbors in a game. On success, returns an Array of GameHighScore objects. This method will currently return scores for the target user, plus two of their closest neighbors - on each side. Will also return the top three users if the user and his neighbors - are not among them. + on each side. Will also return the top three users if the user and their + neighbors are not among them. """ call = GetGameHighScores( user_id=user_id, diff --git a/aiogram/methods/__init__.py b/aiogram/methods/__init__.py index f7b75066..72771afc 100644 --- a/aiogram/methods/__init__.py +++ b/aiogram/methods/__init__.py @@ -11,6 +11,7 @@ from .base import Request, Response, TelegramMethod from .close import Close from .copy_message import CopyMessage from .create_chat_invite_link import CreateChatInviteLink +from .create_invoice_link import CreateInvoiceLink from .create_new_sticker_set import CreateNewStickerSet from .decline_chat_join_request import DeclineChatJoinRequest from .delete_chat_photo import DeleteChatPhoto @@ -176,6 +177,7 @@ __all__ = ( "AnswerInlineQuery", "AnswerWebAppQuery", "SendInvoice", + "CreateInvoiceLink", "AnswerShippingQuery", "AnswerPreCheckoutQuery", "SetPassportDataErrors", diff --git a/aiogram/methods/add_sticker_to_set.py b/aiogram/methods/add_sticker_to_set.py index 7b676674..6fe7b7a1 100644 --- a/aiogram/methods/add_sticker_to_set.py +++ b/aiogram/methods/add_sticker_to_set.py @@ -25,7 +25,7 @@ class AddStickerToSet(TelegramMethod[bool]): emojis: str """One or more emoji corresponding to the sticker""" png_sticker: Optional[Union[InputFile, str]] = None - """**PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More info on Sending Files » `""" + """**PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » `""" tgs_sticker: Optional[InputFile] = None """**TGS** animation with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for technical requirements""" webm_sticker: Optional[InputFile] = None diff --git a/aiogram/methods/answer_callback_query.py b/aiogram/methods/answer_callback_query.py index 04f8282c..3059fc1c 100644 --- a/aiogram/methods/answer_callback_query.py +++ b/aiogram/methods/answer_callback_query.py @@ -12,7 +12,7 @@ class AnswerCallbackQuery(TelegramMethod[bool]): """ Use this method to send answers to callback queries sent from `inline keyboards `_. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, :code:`True` is returned. - Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via `@Botfather `_ and accept the terms. Otherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that open your bot with a parameter. + Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via `@BotFather `_ and accept the terms. Otherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that open your bot with a parameter. Source: https://core.telegram.org/bots/api#answercallbackquery """ @@ -26,7 +26,7 @@ class AnswerCallbackQuery(TelegramMethod[bool]): show_alert: Optional[bool] = None """If :code:`True`, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to *false*.""" url: Optional[str] = None - """URL that will be opened by the user's client. If you have created a :class:`aiogram.types.game.Game` and accepted the conditions via `@Botfather `_, specify the URL that opens your game — note that this will only work if the query comes from a `https://core.telegram.org/bots/api#inlinekeyboardbutton `_ *callback_game* button.""" + """URL that will be opened by the user's client. If you have created a :class:`aiogram.types.game.Game` and accepted the conditions via `@BotFather `_, specify the URL that opens your game - note that this will only work if the query comes from a `https://core.telegram.org/bots/api#inlinekeyboardbutton `_ *callback_game* button.""" cache_time: Optional[int] = None """The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.""" diff --git a/aiogram/methods/answer_web_app_query.py b/aiogram/methods/answer_web_app_query.py index 3211ed38..c9315ee8 100644 --- a/aiogram/methods/answer_web_app_query.py +++ b/aiogram/methods/answer_web_app_query.py @@ -25,7 +25,9 @@ class AnswerWebAppQuery(TelegramMethod[SentWebAppMessage]): def build_request(self, bot: Bot) -> Request: data: Dict[str, Any] = self.dict() + prepare_parse_mode( bot, data["result"], parse_mode_property="parse_mode", entities_property="entities" ) + return Request(method="answerWebAppQuery", data=data) diff --git a/aiogram/methods/create_chat_invite_link.py b/aiogram/methods/create_chat_invite_link.py index 965844d9..a9cf9144 100644 --- a/aiogram/methods/create_chat_invite_link.py +++ b/aiogram/methods/create_chat_invite_link.py @@ -26,7 +26,7 @@ class CreateChatInviteLink(TelegramMethod[ChatInviteLink]): expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None """Point in time (Unix timestamp) when the link will expire""" member_limit: Optional[int] = None - """Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999""" + """The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999""" creates_join_request: Optional[bool] = None """:code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified""" diff --git a/aiogram/methods/create_invoice_link.py b/aiogram/methods/create_invoice_link.py new file mode 100644 index 00000000..16208f27 --- /dev/null +++ b/aiogram/methods/create_invoice_link.py @@ -0,0 +1,65 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Dict, List, Optional + +from ..types import LabeledPrice +from .base import Request, TelegramMethod + +if TYPE_CHECKING: + from ..client.bot import Bot + + +class CreateInvoiceLink(TelegramMethod[str]): + """ + Use this method to create a link for an invoice. Returns the created invoice link as *String* on success. + + Source: https://core.telegram.org/bots/api#createinvoicelink + """ + + __returning__ = str + + title: str + """Product name, 1-32 characters""" + description: str + """Product description, 1-255 characters""" + payload: str + """Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.""" + provider_token: str + """Payment provider token, obtained via `BotFather `_""" + currency: str + """Three-letter ISO 4217 currency code, see `more on currencies `_""" + prices: List[LabeledPrice] + """Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)""" + max_tip_amount: Optional[int] = None + """The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0""" + suggested_tip_amounts: Optional[List[int]] = None + """A JSON-serialized array of suggested amounts of tips in the *smallest units* of the currency (integer, **not** float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed *max_tip_amount*.""" + provider_data: Optional[str] = None + """JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.""" + photo_url: Optional[str] = None + """URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.""" + photo_size: Optional[int] = None + """Photo size in bytes""" + photo_width: Optional[int] = None + """Photo width""" + photo_height: Optional[int] = None + """Photo height""" + need_name: Optional[bool] = None + """Pass :code:`True`, if you require the user's full name to complete the order""" + need_phone_number: Optional[bool] = None + """Pass :code:`True`, if you require the user's phone number to complete the order""" + need_email: Optional[bool] = None + """Pass :code:`True`, if you require the user's email address to complete the order""" + need_shipping_address: Optional[bool] = None + """Pass :code:`True`, if you require the user's shipping address to complete the order""" + send_phone_number_to_provider: Optional[bool] = None + """Pass :code:`True`, if the user's phone number should be sent to the provider""" + send_email_to_provider: Optional[bool] = None + """Pass :code:`True`, if the user's email address should be sent to the provider""" + is_flexible: Optional[bool] = None + """Pass :code:`True`, if the final price depends on the shipping method""" + + def build_request(self, bot: Bot) -> Request: + data: Dict[str, Any] = self.dict() + + return Request(method="createInvoiceLink", data=data) diff --git a/aiogram/methods/create_new_sticker_set.py b/aiogram/methods/create_new_sticker_set.py index 5faab9ef..cb77cb97 100644 --- a/aiogram/methods/create_new_sticker_set.py +++ b/aiogram/methods/create_new_sticker_set.py @@ -21,13 +21,13 @@ class CreateNewStickerSet(TelegramMethod[bool]): user_id: int """User identifier of created sticker set owner""" name: str - """Short name of sticker set, to be used in :code:`t.me/addstickers/` URLs (e.g., *animals*). Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in :code:`"_by_"`. :code:`` is case insensitive. 1-64 characters.""" + """Short name of sticker set, to be used in :code:`t.me/addstickers/` URLs (e.g., *animals*). Can contain only English letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in :code:`"_by_"`. :code:`` is case insensitive. 1-64 characters.""" title: str """Sticker set title, 1-64 characters""" emojis: str """One or more emoji corresponding to the sticker""" png_sticker: Optional[Union[InputFile, str]] = None - """**PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More info on Sending Files » `""" + """**PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » `""" tgs_sticker: Optional[InputFile] = None """**TGS** animation with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for technical requirements""" webm_sticker: Optional[InputFile] = None diff --git a/aiogram/methods/edit_chat_invite_link.py b/aiogram/methods/edit_chat_invite_link.py index 67354688..3bd3a4c3 100644 --- a/aiogram/methods/edit_chat_invite_link.py +++ b/aiogram/methods/edit_chat_invite_link.py @@ -28,7 +28,7 @@ class EditChatInviteLink(TelegramMethod[ChatInviteLink]): expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None """Point in time (Unix timestamp) when the link will expire""" member_limit: Optional[int] = None - """Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999""" + """The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999""" creates_join_request: Optional[bool] = None """:code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified""" diff --git a/aiogram/methods/edit_message_live_location.py b/aiogram/methods/edit_message_live_location.py index e8a34f19..52e6acfa 100644 --- a/aiogram/methods/edit_message_live_location.py +++ b/aiogram/methods/edit_message_live_location.py @@ -33,7 +33,7 @@ class EditMessageLiveLocation(TelegramMethod[Union[Message, bool]]): heading: Optional[int] = None """Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.""" proximity_alert_radius: Optional[int] = None - """Maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.""" + """The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.""" reply_markup: Optional[InlineKeyboardMarkup] = None """A JSON-serialized object for a new `inline keyboard `_.""" diff --git a/aiogram/methods/get_file.py b/aiogram/methods/get_file.py index 163d484d..9b006296 100644 --- a/aiogram/methods/get_file.py +++ b/aiogram/methods/get_file.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: class GetFile(TelegramMethod[File]): """ - Use this method to get basic info about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a :class:`aiogram.types.file.File` object is returned. The file can then be downloaded via the link :code:`https://api.telegram.org/file/bot/`, where :code:`` is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling :class:`aiogram.methods.get_file.GetFile` again. + Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a :class:`aiogram.types.file.File` object is returned. The file can then be downloaded via the link :code:`https://api.telegram.org/file/bot/`, where :code:`` is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling :class:`aiogram.methods.get_file.GetFile` again. **Note:** This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received. Source: https://core.telegram.org/bots/api#getfile @@ -20,7 +20,7 @@ class GetFile(TelegramMethod[File]): __returning__ = File file_id: str - """File identifier to get info about""" + """File identifier to get information about""" def build_request(self, bot: Bot) -> Request: data: Dict[str, Any] = self.dict() diff --git a/aiogram/methods/get_game_high_scores.py b/aiogram/methods/get_game_high_scores.py index 18a4eb2d..67df9338 100644 --- a/aiogram/methods/get_game_high_scores.py +++ b/aiogram/methods/get_game_high_scores.py @@ -13,7 +13,7 @@ class GetGameHighScores(TelegramMethod[List[GameHighScore]]): """ Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. On success, returns an *Array* of :class:`aiogram.types.game_high_score.GameHighScore` objects. - This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and his neighbors are not among them. Please note that this behavior is subject to change. + This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and their neighbors are not among them. Please note that this behavior is subject to change. Source: https://core.telegram.org/bots/api#getgamehighscores """ diff --git a/aiogram/methods/send_animation.py b/aiogram/methods/send_animation.py index 97b483a4..78801a1e 100644 --- a/aiogram/methods/send_animation.py +++ b/aiogram/methods/send_animation.py @@ -30,7 +30,7 @@ class SendAnimation(TelegramMethod[Message]): chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" animation: Union[InputFile, str] - """Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More info on Sending Files » `""" + """Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files » `""" duration: Optional[int] = None """Duration of sent animation in seconds""" width: Optional[int] = None @@ -38,7 +38,7 @@ class SendAnimation(TelegramMethod[Message]): height: Optional[int] = None """Animation height""" thumb: Optional[Union[InputFile, str]] = None - """Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More info on Sending Files » `""" + """Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `""" caption: Optional[str] = None """Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing""" parse_mode: Optional[str] = UNSET diff --git a/aiogram/methods/send_audio.py b/aiogram/methods/send_audio.py index 16b24723..4e31ed92 100644 --- a/aiogram/methods/send_audio.py +++ b/aiogram/methods/send_audio.py @@ -31,7 +31,7 @@ class SendAudio(TelegramMethod[Message]): chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" audio: Union[InputFile, str] - """Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More info on Sending Files » `""" + """Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » `""" caption: Optional[str] = None """Audio caption, 0-1024 characters after entities parsing""" parse_mode: Optional[str] = UNSET @@ -45,7 +45,7 @@ class SendAudio(TelegramMethod[Message]): title: Optional[str] = None """Track name""" thumb: Optional[Union[InputFile, str]] = None - """Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More info on Sending Files » `""" + """Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" protect_content: Optional[bool] = None diff --git a/aiogram/methods/send_document.py b/aiogram/methods/send_document.py index 17f38dfb..a2de750d 100644 --- a/aiogram/methods/send_document.py +++ b/aiogram/methods/send_document.py @@ -30,9 +30,9 @@ class SendDocument(TelegramMethod[Message]): chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" document: Union[InputFile, str] - """File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More info on Sending Files » `""" + """File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » `""" thumb: Optional[Union[InputFile, str]] = None - """Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More info on Sending Files » `""" + """Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `""" caption: Optional[str] = None """Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing""" parse_mode: Optional[str] = UNSET diff --git a/aiogram/methods/send_game.py b/aiogram/methods/send_game.py index ba430845..416cd919 100644 --- a/aiogram/methods/send_game.py +++ b/aiogram/methods/send_game.py @@ -21,7 +21,7 @@ class SendGame(TelegramMethod[Message]): chat_id: int """Unique identifier for the target chat""" game_short_name: str - """Short name of the game, serves as the unique identifier for the game. Set up your games via `Botfather `_.""" + """Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_.""" 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_invoice.py b/aiogram/methods/send_invoice.py index 95c61ef6..0e882699 100644 --- a/aiogram/methods/send_invoice.py +++ b/aiogram/methods/send_invoice.py @@ -27,7 +27,7 @@ class SendInvoice(TelegramMethod[Message]): payload: str """Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.""" provider_token: str - """Payments provider token, obtained via `Botfather `_""" + """Payment provider token, obtained via `@BotFather `_""" currency: str """Three-letter ISO 4217 currency code, see `more on currencies `_""" prices: List[LabeledPrice] @@ -39,11 +39,11 @@ class SendInvoice(TelegramMethod[Message]): start_parameter: Optional[str] = None """Unique deep-linking parameter. If left empty, **forwarded copies** of the sent message will have a *Pay* button, allowing multiple users to pay directly from the forwarded message, using the same invoice. If non-empty, forwarded copies of the sent message will have a *URL* button with a deep link to the bot (instead of a *Pay* button), with the value used as the start parameter""" provider_data: Optional[str] = None - """A JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.""" + """JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.""" photo_url: Optional[str] = None """URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.""" photo_size: Optional[int] = None - """Photo size""" + """Photo size in bytes""" photo_width: Optional[int] = None """Photo width""" photo_height: Optional[int] = None @@ -57,9 +57,9 @@ class SendInvoice(TelegramMethod[Message]): need_shipping_address: Optional[bool] = None """Pass :code:`True`, if you require the user's shipping address to complete the order""" send_phone_number_to_provider: Optional[bool] = None - """Pass :code:`True`, if user's phone number should be sent to provider""" + """Pass :code:`True`, if the user's phone number should be sent to provider""" send_email_to_provider: Optional[bool] = None - """Pass :code:`True`, if user's email address should be sent to provider""" + """Pass :code:`True`, if the user's email address should be sent to provider""" is_flexible: Optional[bool] = None """Pass :code:`True`, if the final price depends on the shipping method""" disable_notification: Optional[bool] = None diff --git a/aiogram/methods/send_photo.py b/aiogram/methods/send_photo.py index faf9353f..a4bb3d03 100644 --- a/aiogram/methods/send_photo.py +++ b/aiogram/methods/send_photo.py @@ -30,7 +30,7 @@ class SendPhoto(TelegramMethod[Message]): chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" photo: Union[InputFile, str] - """Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More info on Sending Files » `""" + """Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files » `""" caption: Optional[str] = None """Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing""" parse_mode: Optional[str] = UNSET diff --git a/aiogram/methods/send_sticker.py b/aiogram/methods/send_sticker.py index 573040e1..964f3e20 100644 --- a/aiogram/methods/send_sticker.py +++ b/aiogram/methods/send_sticker.py @@ -28,7 +28,7 @@ class SendSticker(TelegramMethod[Message]): chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" sticker: Union[InputFile, str] - """Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP file from the Internet, or upload a new one using multipart/form-data. :ref:`More info on Sending Files » `""" + """Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » `""" 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 4ed09cf1..a41dbfe9 100644 --- a/aiogram/methods/send_video.py +++ b/aiogram/methods/send_video.py @@ -20,7 +20,7 @@ if TYPE_CHECKING: class SendVideo(TelegramMethod[Message]): """ - Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. + Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. Source: https://core.telegram.org/bots/api#sendvideo """ @@ -30,7 +30,7 @@ class SendVideo(TelegramMethod[Message]): chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" video: Union[InputFile, str] - """Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More info on Sending Files » `""" + """Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files » `""" duration: Optional[int] = None """Duration of sent video in seconds""" width: Optional[int] = None @@ -38,7 +38,7 @@ class SendVideo(TelegramMethod[Message]): height: Optional[int] = None """Video height""" thumb: Optional[Union[InputFile, str]] = None - """Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More info on Sending Files » `""" + """Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `""" caption: Optional[str] = None """Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing""" parse_mode: Optional[str] = UNSET diff --git a/aiogram/methods/send_video_note.py b/aiogram/methods/send_video_note.py index 7431d582..d26557b7 100644 --- a/aiogram/methods/send_video_note.py +++ b/aiogram/methods/send_video_note.py @@ -18,7 +18,7 @@ if TYPE_CHECKING: class SendVideoNote(TelegramMethod[Message]): """ - As of `v.4.0 `_, Telegram clients support rounded square mp4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent :class:`aiogram.types.message.Message` is returned. + As of `v.4.0 `_, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent :class:`aiogram.types.message.Message` is returned. Source: https://core.telegram.org/bots/api#sendvideonote """ @@ -28,13 +28,13 @@ class SendVideoNote(TelegramMethod[Message]): chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" video_note: Union[InputFile, str] - """Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More info on Sending Files » `. Sending video notes by a URL is currently unsupported""" + """Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » `. Sending video notes by a URL is currently unsupported""" duration: Optional[int] = None """Duration of sent video in seconds""" length: Optional[int] = None """Video width and height, i.e. diameter of the video message""" thumb: Optional[Union[InputFile, str]] = None - """Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More info on Sending Files » `""" + """Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" protect_content: Optional[bool] = None diff --git a/aiogram/methods/send_voice.py b/aiogram/methods/send_voice.py index e753e9e1..afa9f75f 100644 --- a/aiogram/methods/send_voice.py +++ b/aiogram/methods/send_voice.py @@ -30,7 +30,7 @@ class SendVoice(TelegramMethod[Message]): chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" voice: Union[InputFile, str] - """Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More info on Sending Files » `""" + """Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » `""" caption: Optional[str] = None """Voice message caption, 0-1024 characters after entities parsing""" parse_mode: Optional[str] = UNSET diff --git a/aiogram/methods/set_chat_menu_button.py b/aiogram/methods/set_chat_menu_button.py index 6578ec4e..25301431 100644 --- a/aiogram/methods/set_chat_menu_button.py +++ b/aiogram/methods/set_chat_menu_button.py @@ -21,7 +21,7 @@ class SetChatMenuButton(TelegramMethod[bool]): chat_id: Optional[int] = None """Unique identifier for the target private chat. If not specified, default bot's menu button will be changed""" menu_button: Optional[MenuButton] = None - """A JSON-serialized object for the new bot's menu button. Defaults to :class:`aiogram.types.menu_button_default.MenuButtonDefault`""" + """A JSON-serialized object for the bot's new menu button. Defaults to :class:`aiogram.types.menu_button_default.MenuButtonDefault`""" def build_request(self, bot: Bot) -> Request: data: Dict[str, Any] = self.dict() diff --git a/aiogram/methods/set_sticker_set_thumb.py b/aiogram/methods/set_sticker_set_thumb.py index 49ef7971..cbab57e4 100644 --- a/aiogram/methods/set_sticker_set_thumb.py +++ b/aiogram/methods/set_sticker_set_thumb.py @@ -23,7 +23,7 @@ class SetStickerSetThumb(TelegramMethod[bool]): user_id: int """User identifier of the sticker set owner""" thumb: Optional[Union[InputFile, str]] = None - """A **PNG** image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a **TGS** animation with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for animated sticker technical requirements, or a **WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More info on Sending Files » `. Animated sticker set thumbnails can't be uploaded via HTTP URL.""" + """A **PNG** image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a **TGS** animation with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for animated sticker technical requirements, or a **WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » `. Animated sticker set thumbnails can't be uploaded via HTTP URL.""" def build_request(self, bot: Bot) -> Request: data: Dict[str, Any] = self.dict(exclude={"thumb"}) diff --git a/aiogram/methods/set_webhook.py b/aiogram/methods/set_webhook.py index 2b80dd17..34c14aaf 100644 --- a/aiogram/methods/set_webhook.py +++ b/aiogram/methods/set_webhook.py @@ -11,8 +11,8 @@ if TYPE_CHECKING: class SetWebhook(TelegramMethod[bool]): """ - Use this method to specify a url and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified url, containing a JSON-serialized :class:`aiogram.types.update.Update`. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns :code:`True` on success. - If you'd like to make sure that the Webhook request comes from Telegram, we recommend using a secret path in the URL, e.g. :code:`https://www.example.com/`. Since nobody else knows your bot's token, you can be pretty sure it's us. + Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized :class:`aiogram.types.update.Update`. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns :code:`True` on success. + If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter *secret_token*. If specified, the request will contain a header 'X-Telegram-Bot-Api-Secret-Token' with the secret token as content. **Notes** @@ -20,8 +20,8 @@ class SetWebhook(TelegramMethod[bool]): **2.** To use a self-signed certificate, you need to upload your `public key certificate `_ using *certificate* parameter. Please upload as InputFile, sending a String will not work. - **3.** Ports currently supported *for Webhooks*: **443, 80, 88, 8443**. - **NEW!** If you're having any trouble setting up webhooks, please check out this `amazing guide to Webhooks `_. + **3.** Ports currently supported *for webhooks*: **443, 80, 88, 8443**. + If you're having any trouble setting up webhooks, please check out this `amazing guide to webhooks `_. Source: https://core.telegram.org/bots/api#setwebhook """ @@ -29,17 +29,19 @@ class SetWebhook(TelegramMethod[bool]): __returning__ = bool url: str - """HTTPS url to send updates to. Use an empty string to remove webhook integration""" + """HTTPS URL to send updates to. Use an empty string to remove webhook integration""" certificate: Optional[InputFile] = None """Upload your public key certificate so that the root certificate in use can be checked. See our `self-signed guide `_ for details.""" ip_address: Optional[str] = None """The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS""" max_connections: Optional[int] = None - """Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to *40*. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput.""" + """The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to *40*. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput.""" allowed_updates: Optional[List[str]] = None """A JSON-serialized list of the update types you want your bot to receive. For example, specify ['message', 'edited_channel_post', 'callback_query'] to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member* (default). If not specified, the previous setting will be used.""" drop_pending_updates: Optional[bool] = None """Pass :code:`True` to drop all pending updates""" + secret_token: Optional[str] = None + """A secret token to be sent in a header 'X-Telegram-Bot-Api-Secret-Token' in every webhook request, 1-256 characters. Only characters :code:`A-Z`, :code:`a-z`, :code:`0-9`, :code:`_` and :code:`-` are allowed. The header is useful to ensure that the request comes from a webhook set by you.""" def build_request(self, bot: Bot) -> Request: data: Dict[str, Any] = self.dict(exclude={"certificate"}) diff --git a/aiogram/methods/upload_sticker_file.py b/aiogram/methods/upload_sticker_file.py index 3d887abb..cb36ae4d 100644 --- a/aiogram/methods/upload_sticker_file.py +++ b/aiogram/methods/upload_sticker_file.py @@ -21,7 +21,7 @@ class UploadStickerFile(TelegramMethod[File]): user_id: int """User identifier of sticker file owner""" png_sticker: InputFile - """**PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. :ref:`More info on Sending Files » `""" + """**PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. :ref:`More information on Sending Files » `""" def build_request(self, bot: Bot) -> Request: data: Dict[str, Any] = self.dict(exclude={"png_sticker"}) diff --git a/aiogram/types/animation.py b/aiogram/types/animation.py index 54c8f4d2..ce3c034e 100644 --- a/aiogram/types/animation.py +++ b/aiogram/types/animation.py @@ -32,4 +32,4 @@ class Animation(TelegramObject): mime_type: Optional[str] = None """*Optional*. MIME type of the file as defined by sender""" file_size: Optional[int] = None - """*Optional*. File size in bytes""" + """*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.""" diff --git a/aiogram/types/audio.py b/aiogram/types/audio.py index 8d436f3e..fa0557cd 100644 --- a/aiogram/types/audio.py +++ b/aiogram/types/audio.py @@ -30,6 +30,6 @@ class Audio(TelegramObject): mime_type: Optional[str] = None """*Optional*. MIME type of the file as defined by sender""" file_size: Optional[int] = None - """*Optional*. File size in bytes""" + """*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.""" thumb: Optional[PhotoSize] = None """*Optional*. Thumbnail of the album cover to which the music file belongs""" diff --git a/aiogram/types/callback_query.py b/aiogram/types/callback_query.py index 08fddc8a..f9929bca 100644 --- a/aiogram/types/callback_query.py +++ b/aiogram/types/callback_query.py @@ -32,7 +32,7 @@ class CallbackQuery(TelegramObject): inline_message_id: Optional[str] = None """*Optional*. Identifier of the message sent via the bot in inline mode, that originated the query.""" data: Optional[str] = None - """*Optional*. Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field.""" + """*Optional*. Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data.""" game_short_name: Optional[str] = None """*Optional*. Short name of a `Game `_ to be returned, serves as the unique identifier for the game""" diff --git a/aiogram/types/chat.py b/aiogram/types/chat.py index c2df6f6b..1fb92f8a 100644 --- a/aiogram/types/chat.py +++ b/aiogram/types/chat.py @@ -36,7 +36,11 @@ class Chat(TelegramObject): bio: Optional[str] = None """*Optional*. Bio of the other party in a private chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" has_private_forwards: Optional[bool] = None - """*Optional*. True, if privacy settings of the other party in the private chat allows to use :code:`tg://user?id=` links only in chats with the user. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" + """*Optional*. :code:`True`, if privacy settings of the other party in the private chat allows to use :code:`tg://user?id=` links only in chats with the user. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" + join_to_send_messages: Optional[bool] = None + """*Optional*. :code:`True`, if users need to join the supergroup before they can send messages. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" + join_by_request: Optional[bool] = None + """*Optional*. :code:`True`, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" description: Optional[str] = None """*Optional*. Description, for groups, supergroups and channel chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" invite_link: Optional[str] = None @@ -50,7 +54,7 @@ class Chat(TelegramObject): message_auto_delete_time: Optional[int] = None """*Optional*. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" has_protected_content: Optional[bool] = None - """*Optional*. True, if messages from the chat can't be forwarded to other chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" + """*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 """*Optional*. For supergroups, name of group sticker set. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" can_set_sticker_set: Optional[bool] = None diff --git a/aiogram/types/chat_invite_link.py b/aiogram/types/chat_invite_link.py index 1654079d..33593c2d 100644 --- a/aiogram/types/chat_invite_link.py +++ b/aiogram/types/chat_invite_link.py @@ -31,6 +31,6 @@ class ChatInviteLink(TelegramObject): expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None """*Optional*. Point in time (Unix timestamp) when the link will expire or has been expired""" member_limit: Optional[int] = None - """*Optional*. Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999""" + """*Optional*. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999""" pending_join_request_count: Optional[int] = None """*Optional*. Number of pending join requests created using this link""" diff --git a/aiogram/types/chosen_inline_result.py b/aiogram/types/chosen_inline_result.py index 2144c0ca..0ec211f7 100644 --- a/aiogram/types/chosen_inline_result.py +++ b/aiogram/types/chosen_inline_result.py @@ -14,7 +14,7 @@ if TYPE_CHECKING: class ChosenInlineResult(TelegramObject): """ Represents a `result `_ of an inline query that was chosen by the user and sent to their chat partner. - **Note:** It is necessary to enable `inline feedback `_ via `@Botfather `_ in order to receive these objects in updates. + **Note:** It is necessary to enable `inline feedback `_ via `@BotFather `_ in order to receive these objects in updates. Source: https://core.telegram.org/bots/api#choseninlineresult """ diff --git a/aiogram/types/document.py b/aiogram/types/document.py index 377241d3..db2433a8 100644 --- a/aiogram/types/document.py +++ b/aiogram/types/document.py @@ -26,4 +26,4 @@ class Document(TelegramObject): mime_type: Optional[str] = None """*Optional*. MIME type of the file as defined by sender""" file_size: Optional[int] = None - """*Optional*. File size in bytes""" + """*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.""" diff --git a/aiogram/types/encrypted_credentials.py b/aiogram/types/encrypted_credentials.py index 91fd7714..d14c2560 100644 --- a/aiogram/types/encrypted_credentials.py +++ b/aiogram/types/encrypted_credentials.py @@ -5,7 +5,7 @@ from .base import TelegramObject class EncryptedCredentials(TelegramObject): """ - Contains data required for decrypting and authenticating :class:`aiogram.types.encrypted_passport_element.EncryptedPassportElement`. See the `Telegram Passport Documentation `_ for a complete description of the data decryption and authentication processes. + Describes data required for decrypting and authenticating :class:`aiogram.types.encrypted_passport_element.EncryptedPassportElement`. See the `Telegram Passport Documentation `_ for a complete description of the data decryption and authentication processes. Source: https://core.telegram.org/bots/api#encryptedcredentials """ diff --git a/aiogram/types/encrypted_passport_element.py b/aiogram/types/encrypted_passport_element.py index 7b958f29..27506298 100644 --- a/aiogram/types/encrypted_passport_element.py +++ b/aiogram/types/encrypted_passport_element.py @@ -10,7 +10,7 @@ if TYPE_CHECKING: class EncryptedPassportElement(TelegramObject): """ - Contains information about documents or other Telegram Passport elements shared with the bot by the user. + Describes documents or other Telegram Passport elements shared with the bot by the user. Source: https://core.telegram.org/bots/api#encryptedpassportelement """ diff --git a/aiogram/types/file.py b/aiogram/types/file.py index 9a0e3206..3e6e769e 100644 --- a/aiogram/types/file.py +++ b/aiogram/types/file.py @@ -9,7 +9,7 @@ class File(TelegramObject): """ This object represents a file ready to be downloaded. The file can be downloaded via the link :code:`https://api.telegram.org/file/bot/`. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling :class:`aiogram.methods.get_file.GetFile`. - Maximum file size to download is 20 MB + The maximum file size to download is 20 MB Source: https://core.telegram.org/bots/api#file """ @@ -19,6 +19,6 @@ class File(TelegramObject): file_unique_id: str """Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.""" file_size: Optional[int] = None - """*Optional*. File size in bytes, if known""" + """*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.""" file_path: Optional[str] = None """*Optional*. File path. Use :code:`https://api.telegram.org/file/bot/` to get the file.""" diff --git a/aiogram/types/force_reply.py b/aiogram/types/force_reply.py index bd8e8900..55f1b6c9 100644 --- a/aiogram/types/force_reply.py +++ b/aiogram/types/force_reply.py @@ -16,7 +16,7 @@ class ForceReply(MutableTelegramObject): - Explain the user how to send a command with parameters (e.g. /newpoll question answer1 answer2). May be appealing for hardcore users but lacks modern day polish. - Guide the user through a step-by-step process. 'Please send me your question', 'Cool, now let's add the first answer option', 'Great. Keep adding answer options, then send /done when you're ready'. - The last option is definitely more attractive. And if you use :class:`aiogram.types.force_reply.ForceReply` in your bot's questions, it will receive the user's answers even if it only receives replies, commands and mentions — without any extra work for the user. + The last option is definitely more attractive. And if you use :class:`aiogram.types.force_reply.ForceReply` in your bot's questions, it will receive the user's answers even if it only receives replies, commands and mentions - without any extra work for the user. Source: https://core.telegram.org/bots/api#forcereply """ diff --git a/aiogram/types/inline_keyboard_button.py b/aiogram/types/inline_keyboard_button.py index aeb546f1..c4208b70 100644 --- a/aiogram/types/inline_keyboard_button.py +++ b/aiogram/types/inline_keyboard_button.py @@ -20,17 +20,17 @@ class InlineKeyboardButton(MutableTelegramObject): text: str """Label text on the button""" url: Optional[str] = None - """*Optional*. HTTP or tg:// url to be opened when the button is pressed. Links :code:`tg://user?id=` can be used to mention a user by their ID without using a username, if this is allowed by their privacy settings.""" + """*Optional*. HTTP or tg:// URL to be opened when the button is pressed. Links :code:`tg://user?id=` can be used to mention a user by their ID without using a username, if this is allowed by their privacy settings.""" callback_data: Optional[str] = None """*Optional*. Data to be sent in a `callback query `_ to the bot when button is pressed, 1-64 bytes""" web_app: Optional[WebAppInfo] = None """*Optional*. Description of the `Web App `_ that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method :class:`aiogram.methods.answer_web_app_query.AnswerWebAppQuery`. Available only in private chats between a user and the bot.""" login_url: Optional[LoginUrl] = None - """*Optional*. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the `Telegram Login Widget `_.""" + """*Optional*. An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the `Telegram Login Widget `_.""" switch_inline_query: Optional[str] = None - """*Optional*. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. Can be empty, in which case just the bot's username will be inserted.""" + """*Optional*. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted.""" switch_inline_query_current_chat: Optional[str] = None - """*Optional*. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. Can be empty, in which case only the bot's username will be inserted.""" + """*Optional*. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted.""" callback_game: Optional[CallbackGame] = None """*Optional*. Description of the game that will be launched when the user presses the button.""" pay: Optional[bool] = None diff --git a/aiogram/types/inline_query.py b/aiogram/types/inline_query.py index 89602803..d5c674ae 100644 --- a/aiogram/types/inline_query.py +++ b/aiogram/types/inline_query.py @@ -29,7 +29,7 @@ class InlineQuery(TelegramObject): offset: str """Offset of the results to be returned, can be controlled by the bot""" chat_type: Optional[str] = None - """*Optional*. Type of the chat, from which the inline query was sent. Can be either 'sender' for a private chat with the inline query sender, 'private', 'group', 'supergroup', or 'channel'. The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat""" + """*Optional*. Type of the chat from which the inline query was sent. Can be either 'sender' for a private chat with the inline query sender, 'private', 'group', 'supergroup', or 'channel'. The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat""" location: Optional[Location] = None """*Optional*. Sender location, only for bots that request user location""" diff --git a/aiogram/types/inline_query_result_cached_mpeg4_gif.py b/aiogram/types/inline_query_result_cached_mpeg4_gif.py index 7076c187..0500603f 100644 --- a/aiogram/types/inline_query_result_cached_mpeg4_gif.py +++ b/aiogram/types/inline_query_result_cached_mpeg4_gif.py @@ -25,7 +25,7 @@ class InlineQueryResultCachedMpeg4Gif(InlineQueryResult): id: str """Unique identifier for this result, 1-64 bytes""" mpeg4_file_id: str - """A valid file identifier for the MP4 file""" + """A valid file identifier for the MPEG4 file""" title: Optional[str] = None """*Optional*. Title for the result""" caption: Optional[str] = None diff --git a/aiogram/types/inline_query_result_document.py b/aiogram/types/inline_query_result_document.py index 40052009..7b35c69a 100644 --- a/aiogram/types/inline_query_result_document.py +++ b/aiogram/types/inline_query_result_document.py @@ -30,7 +30,7 @@ class InlineQueryResultDocument(InlineQueryResult): document_url: str """A valid URL for the file""" mime_type: str - """Mime type of the content of the file, either 'application/pdf' or 'application/zip'""" + """MIME type of the content of the file, either 'application/pdf' or 'application/zip'""" caption: Optional[str] = None """*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing""" parse_mode: Optional[str] = UNSET diff --git a/aiogram/types/inline_query_result_mpeg4_gif.py b/aiogram/types/inline_query_result_mpeg4_gif.py index dc93b16a..242386f6 100644 --- a/aiogram/types/inline_query_result_mpeg4_gif.py +++ b/aiogram/types/inline_query_result_mpeg4_gif.py @@ -25,7 +25,7 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult): id: str """Unique identifier for this result, 1-64 bytes""" mpeg4_url: str - """A valid URL for the MP4 file. File size must not exceed 1MB""" + """A valid URL for the MPEG4 file. File size must not exceed 1MB""" thumb_url: str """URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result""" mpeg4_width: Optional[int] = None diff --git a/aiogram/types/inline_query_result_video.py b/aiogram/types/inline_query_result_video.py index 3e8ef3f0..abd76c94 100644 --- a/aiogram/types/inline_query_result_video.py +++ b/aiogram/types/inline_query_result_video.py @@ -29,7 +29,7 @@ class InlineQueryResultVideo(InlineQueryResult): video_url: str """A valid URL for the embedded video player or video file""" mime_type: str - """Mime type of the content of video url, 'text/html' or 'video/mp4'""" + """MIME type of the content of the video URL, 'text/html' or 'video/mp4'""" thumb_url: str """URL of the thumbnail (JPEG only) for the video""" title: str diff --git a/aiogram/types/input_invoice_message_content.py b/aiogram/types/input_invoice_message_content.py index 301fbd81..8636cf07 100644 --- a/aiogram/types/input_invoice_message_content.py +++ b/aiogram/types/input_invoice_message_content.py @@ -22,7 +22,7 @@ class InputInvoiceMessageContent(InputMessageContent): payload: str """Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.""" provider_token: str - """Payment provider token, obtained via `Botfather `_""" + """Payment provider token, obtained via `@BotFather `_""" currency: str """Three-letter ISO 4217 currency code, see `more on currencies `_""" prices: List[LabeledPrice] @@ -34,9 +34,9 @@ class InputInvoiceMessageContent(InputMessageContent): provider_data: Optional[str] = None """*Optional*. A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider.""" photo_url: Optional[str] = None - """*Optional*. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.""" + """*Optional*. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.""" photo_size: Optional[int] = None - """*Optional*. Photo size""" + """*Optional*. Photo size in bytes""" photo_width: Optional[int] = None """*Optional*. Photo width""" photo_height: Optional[int] = None @@ -50,8 +50,8 @@ class InputInvoiceMessageContent(InputMessageContent): need_shipping_address: Optional[bool] = None """*Optional*. Pass :code:`True`, if you require the user's shipping address to complete the order""" send_phone_number_to_provider: Optional[bool] = None - """*Optional*. Pass :code:`True`, if user's phone number should be sent to provider""" + """*Optional*. Pass :code:`True`, if the user's phone number should be sent to provider""" send_email_to_provider: Optional[bool] = None - """*Optional*. Pass :code:`True`, if user's email address should be sent to provider""" + """*Optional*. Pass :code:`True`, if the user's email address should be sent to provider""" is_flexible: Optional[bool] = None """*Optional*. Pass :code:`True`, if the final price depends on the shipping method""" diff --git a/aiogram/types/input_media_animation.py b/aiogram/types/input_media_animation.py index 35f28509..7e25a8a2 100644 --- a/aiogram/types/input_media_animation.py +++ b/aiogram/types/input_media_animation.py @@ -22,9 +22,9 @@ class InputMediaAnimation(InputMedia): type: str = Field("animation", const=True) """Type of the result, must be *animation*""" media: Union[str, InputFile] - """File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More info on Sending Files » `""" + """File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `""" thumb: Optional[Union[InputFile, str]] = None - """*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More info on Sending Files » `""" + """*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `""" caption: Optional[str] = None """*Optional*. Caption of the animation to be sent, 0-1024 characters after entities parsing""" parse_mode: Optional[str] = UNSET diff --git a/aiogram/types/input_media_audio.py b/aiogram/types/input_media_audio.py index 0265f67a..35884192 100644 --- a/aiogram/types/input_media_audio.py +++ b/aiogram/types/input_media_audio.py @@ -22,9 +22,9 @@ class InputMediaAudio(InputMedia): type: str = Field("audio", const=True) """Type of the result, must be *audio*""" media: Union[str, InputFile] - """File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More info on Sending Files » `""" + """File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `""" thumb: Optional[Union[InputFile, str]] = None - """*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More info on Sending Files » `""" + """*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `""" caption: Optional[str] = None """*Optional*. Caption of the audio to be sent, 0-1024 characters after entities parsing""" parse_mode: Optional[str] = UNSET diff --git a/aiogram/types/input_media_document.py b/aiogram/types/input_media_document.py index f8b3b681..639be1ed 100644 --- a/aiogram/types/input_media_document.py +++ b/aiogram/types/input_media_document.py @@ -22,9 +22,9 @@ class InputMediaDocument(InputMedia): type: str = Field("document", const=True) """Type of the result, must be *document*""" media: Union[str, InputFile] - """File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More info on Sending Files » `""" + """File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `""" thumb: Optional[Union[InputFile, str]] = None - """*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More info on Sending Files » `""" + """*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `""" caption: Optional[str] = None """*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing""" parse_mode: Optional[str] = UNSET diff --git a/aiogram/types/input_media_photo.py b/aiogram/types/input_media_photo.py index 09aa2918..d824f5f5 100644 --- a/aiogram/types/input_media_photo.py +++ b/aiogram/types/input_media_photo.py @@ -22,7 +22,7 @@ class InputMediaPhoto(InputMedia): type: str = Field("photo", const=True) """Type of the result, must be *photo*""" media: Union[str, InputFile] - """File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More info on Sending Files » `""" + """File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `""" caption: Optional[str] = None """*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing""" parse_mode: Optional[str] = UNSET diff --git a/aiogram/types/input_media_video.py b/aiogram/types/input_media_video.py index b66a16c3..72149b84 100644 --- a/aiogram/types/input_media_video.py +++ b/aiogram/types/input_media_video.py @@ -22,9 +22,9 @@ class InputMediaVideo(InputMedia): type: str = Field("video", const=True) """Type of the result, must be *video*""" media: Union[str, InputFile] - """File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More info on Sending Files » `""" + """File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `""" thumb: Optional[Union[InputFile, str]] = None - """*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More info on Sending Files » `""" + """*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `""" caption: Optional[str] = None """*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing""" parse_mode: Optional[str] = UNSET diff --git a/aiogram/types/keyboard_button.py b/aiogram/types/keyboard_button.py index bf8b0258..40c70420 100644 --- a/aiogram/types/keyboard_button.py +++ b/aiogram/types/keyboard_button.py @@ -15,7 +15,7 @@ class WebApp(MutableTelegramObject): class KeyboardButton(MutableTelegramObject): """ - This object represents one button of the reply keyboard. For simple text buttons *String* can be used instead of this object to specify text of the button. Optional fields *request_contact*, *request_location*, and *request_poll* are mutually exclusive. + This object represents one button of the reply keyboard. For simple text buttons *String* can be used instead of this object to specify text of the button. Optional fields *web_app*, *request_contact*, *request_location*, and *request_poll* are mutually exclusive. **Note:** *request_contact* and *request_location* options will only work in Telegram versions released after 9 April, 2016. Older clients will display *unsupported message*. **Note:** *request_poll* option will only work in Telegram versions released after 23 January, 2020. Older clients will display *unsupported message*. diff --git a/aiogram/types/location.py b/aiogram/types/location.py index 2c4a1f88..bac5fc70 100644 --- a/aiogram/types/location.py +++ b/aiogram/types/location.py @@ -23,4 +23,4 @@ class Location(TelegramObject): heading: Optional[int] = None """*Optional*. The direction in which user is moving, in degrees; 1-360. For active live locations only.""" proximity_alert_radius: Optional[int] = None - """*Optional*. Maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.""" + """*Optional*. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.""" diff --git a/aiogram/types/message.py b/aiogram/types/message.py index 74186eef..f4b26087 100644 --- a/aiogram/types/message.py +++ b/aiogram/types/message.py @@ -88,7 +88,7 @@ class Message(TelegramObject): from_user: Optional[User] = Field(None, alias="from") """*Optional*. Sender of the message; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.""" sender_chat: Optional[Chat] = None - """*Optional*. Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field *from* contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.""" + """*Optional*. Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field *from* contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.""" forward_from: Optional[User] = None """*Optional*. For forwarded messages, sender of the original message""" forward_from_chat: Optional[Chat] = None @@ -102,7 +102,7 @@ class Message(TelegramObject): forward_date: Optional[int] = None """*Optional*. For forwarded messages, date the original message was sent in Unix time""" is_automatic_forward: Optional[bool] = None - """*Optional*. True, if the message is a channel post that was automatically forwarded to the connected discussion group""" + """*Optional*. :code:`True`, if the message is a channel post that was automatically forwarded to the connected discussion group""" reply_to_message: Optional[Message] = None """*Optional*. For replies, the original message. Note that the Message object in this field will not contain further *reply_to_message* fields even if it itself is a reply.""" via_bot: Optional[User] = None @@ -110,13 +110,13 @@ class Message(TelegramObject): edit_date: Optional[int] = None """*Optional*. Date the message was last edited in Unix time""" has_protected_content: Optional[bool] = None - """*Optional*. True, if the message can't be forwarded""" + """*Optional*. :code:`True`, if the message can't be forwarded""" media_group_id: Optional[str] = None """*Optional*. The unique identifier of a media message group this message belongs to""" author_signature: Optional[str] = None """*Optional*. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator""" text: Optional[str] = None - """*Optional*. For text messages, the actual UTF-8 text of the message, 0-4096 characters""" + """*Optional*. For text messages, the actual UTF-8 text of the message""" entities: Optional[List[MessageEntity]] = None """*Optional*. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text""" animation: Optional[Animation] = None @@ -136,7 +136,7 @@ class Message(TelegramObject): voice: Optional[Voice] = None """*Optional*. Message is a voice message, information about the file""" caption: Optional[str] = None - """*Optional*. Caption for the animation, audio, document, photo, video or voice, 0-1024 characters""" + """*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""" contact: Optional[Contact] = None diff --git a/aiogram/types/message_entity.py b/aiogram/types/message_entity.py index 28226286..d50f797a 100644 --- a/aiogram/types/message_entity.py +++ b/aiogram/types/message_entity.py @@ -24,7 +24,7 @@ class MessageEntity(MutableTelegramObject): length: int """Length of the entity in UTF-16 code units""" url: Optional[str] = None - """*Optional*. For 'text_link' only, url that will be opened after user taps on the text""" + """*Optional*. For 'text_link' only, URL that will be opened after user taps on the text""" user: Optional[User] = None """*Optional*. For 'text_mention' only, the mentioned user""" language: Optional[str] = None diff --git a/aiogram/types/passport_data.py b/aiogram/types/passport_data.py index 96608226..18523c05 100644 --- a/aiogram/types/passport_data.py +++ b/aiogram/types/passport_data.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: class PassportData(TelegramObject): """ - Contains information about Telegram Passport data shared with the bot by the user. + Describes Telegram Passport data shared with the bot by the user. Source: https://core.telegram.org/bots/api#passportdata """ diff --git a/aiogram/types/pre_checkout_query.py b/aiogram/types/pre_checkout_query.py index a95fb5f4..f2e49170 100644 --- a/aiogram/types/pre_checkout_query.py +++ b/aiogram/types/pre_checkout_query.py @@ -32,7 +32,7 @@ class PreCheckoutQuery(TelegramObject): shipping_option_id: Optional[str] = None """*Optional*. Identifier of the shipping option chosen by the user""" order_info: Optional[OrderInfo] = None - """*Optional*. Order info provided by the user""" + """*Optional*. Order information provided by the user""" def answer(self, ok: bool, error_message: Optional[str] = None) -> AnswerPreCheckoutQuery: """ diff --git a/aiogram/types/reply_keyboard_markup.py b/aiogram/types/reply_keyboard_markup.py index 6b8a65e3..334168bd 100644 --- a/aiogram/types/reply_keyboard_markup.py +++ b/aiogram/types/reply_keyboard_markup.py @@ -20,7 +20,7 @@ class ReplyKeyboardMarkup(MutableTelegramObject): 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 - """*Optional*. Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again. Defaults to *false*.""" + """*Optional*. Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat - the user can press a special button in the input field to see the custom keyboard again. Defaults to *false*.""" input_field_placeholder: Optional[str] = None """*Optional*. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters""" selective: Optional[bool] = None diff --git a/aiogram/types/response_parameters.py b/aiogram/types/response_parameters.py index 5c722c9e..dd3531c2 100644 --- a/aiogram/types/response_parameters.py +++ b/aiogram/types/response_parameters.py @@ -7,7 +7,7 @@ from .base import TelegramObject class ResponseParameters(TelegramObject): """ - Contains information about why a request was unsuccessful. + Describes why a request was unsuccessful. Source: https://core.telegram.org/bots/api#responseparameters """ diff --git a/aiogram/types/sent_web_app_message.py b/aiogram/types/sent_web_app_message.py index 7295382c..7162d9b7 100644 --- a/aiogram/types/sent_web_app_message.py +++ b/aiogram/types/sent_web_app_message.py @@ -7,7 +7,7 @@ from .base import TelegramObject class SentWebAppMessage(TelegramObject): """ - Contains information about an inline message sent by a `Web App `_ on behalf of a user. + Describes an inline message sent by a `Web App `_ on behalf of a user. Source: https://core.telegram.org/bots/api#sentwebappmessage """ diff --git a/aiogram/types/shipping_address.py b/aiogram/types/shipping_address.py index 4ef322c7..948956ce 100644 --- a/aiogram/types/shipping_address.py +++ b/aiogram/types/shipping_address.py @@ -11,7 +11,7 @@ class ShippingAddress(TelegramObject): """ country_code: str - """ISO 3166-1 alpha-2 country code""" + """Two-letter ISO 3166-1 alpha-2 country code""" state: str """State, if applicable""" city: str diff --git a/aiogram/types/sticker.py b/aiogram/types/sticker.py index 979d7e37..d10844f2 100644 --- a/aiogram/types/sticker.py +++ b/aiogram/types/sticker.py @@ -5,6 +5,7 @@ from typing import TYPE_CHECKING, Optional from .base import TelegramObject if TYPE_CHECKING: + from .file import File from .mask_position import MaskPosition from .photo_size import PhotoSize @@ -34,6 +35,8 @@ class Sticker(TelegramObject): """*Optional*. Emoji associated with the sticker""" set_name: Optional[str] = None """*Optional*. Name of the sticker set to which the sticker belongs""" + premium_animation: Optional[File] = None + """*Optional*. Premium animation for the sticker, if the sticker is premium""" mask_position: Optional[MaskPosition] = None """*Optional*. For mask stickers, the position where the mask should be placed""" file_size: Optional[int] = None diff --git a/aiogram/types/successful_payment.py b/aiogram/types/successful_payment.py index d6e1ded7..d8b0e90c 100644 --- a/aiogram/types/successful_payment.py +++ b/aiogram/types/successful_payment.py @@ -28,4 +28,4 @@ class SuccessfulPayment(TelegramObject): shipping_option_id: Optional[str] = None """*Optional*. Identifier of the shipping option chosen by the user""" order_info: Optional[OrderInfo] = None - """*Optional*. Order info provided by the user""" + """*Optional*. Order information provided by the user""" diff --git a/aiogram/types/update.py b/aiogram/types/update.py index 493d95d5..8c7177f2 100644 --- a/aiogram/types/update.py +++ b/aiogram/types/update.py @@ -28,13 +28,13 @@ class Update(TelegramObject): """ update_id: int - """The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using `Webhooks `_, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.""" + """The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using `webhooks `_, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.""" message: Optional[Message] = None - """*Optional*. New incoming message of any kind — text, photo, sticker, etc.""" + """*Optional*. New incoming message of any kind - text, photo, sticker, etc.""" edited_message: Optional[Message] = None """*Optional*. New version of a message that is known to the bot and was edited""" channel_post: Optional[Message] = None - """*Optional*. New incoming channel post of any kind — text, photo, sticker, etc.""" + """*Optional*. New incoming channel post of any kind - text, photo, sticker, etc.""" edited_channel_post: Optional[Message] = None """*Optional*. New version of a channel post that is known to the bot and was edited""" inline_query: Optional[InlineQuery] = None diff --git a/aiogram/types/user.py b/aiogram/types/user.py index 3f700040..64eb5c73 100644 --- a/aiogram/types/user.py +++ b/aiogram/types/user.py @@ -24,6 +24,10 @@ class User(TelegramObject): """*Optional*. User's or bot's username""" language_code: Optional[str] = None """*Optional*. `IETF language tag `_ of the user's language""" + is_premium: Optional[bool] = None + """*Optional*. :code:`True`, if this user is a Telegram Premium user""" + added_to_attachment_menu: Optional[bool] = None + """*Optional*. :code:`True`, if this user added the bot to the attachment menu""" can_join_groups: Optional[bool] = None """*Optional*. :code:`True`, if the bot can be invited to groups. Returned only in :class:`aiogram.methods.get_me.GetMe`.""" can_read_all_group_messages: Optional[bool] = None diff --git a/aiogram/types/video.py b/aiogram/types/video.py index f245c53c..473527d1 100644 --- a/aiogram/types/video.py +++ b/aiogram/types/video.py @@ -30,6 +30,6 @@ class Video(TelegramObject): file_name: Optional[str] = None """*Optional*. Original filename as defined by sender""" mime_type: Optional[str] = None - """*Optional*. Mime type of a file as defined by sender""" + """*Optional*. MIME type of the file as defined by sender""" file_size: Optional[int] = None - """*Optional*. File size in bytes""" + """*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.""" diff --git a/aiogram/types/voice.py b/aiogram/types/voice.py index ed940ce8..53724ad0 100644 --- a/aiogram/types/voice.py +++ b/aiogram/types/voice.py @@ -21,4 +21,4 @@ class Voice(TelegramObject): mime_type: Optional[str] = None """*Optional*. MIME type of the file as defined by sender""" file_size: Optional[int] = None - """*Optional*. File size in bytes""" + """*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.""" diff --git a/aiogram/types/web_app_data.py b/aiogram/types/web_app_data.py index 6a108fef..09676292 100644 --- a/aiogram/types/web_app_data.py +++ b/aiogram/types/web_app_data.py @@ -5,7 +5,7 @@ from .base import TelegramObject class WebAppData(TelegramObject): """ - Contains data sent from a `Web App `_ to the bot. + Describes data sent from a `Web App `_ to the bot. Source: https://core.telegram.org/bots/api#webappdata """ @@ -13,4 +13,4 @@ class WebAppData(TelegramObject): data: str """The data. Be aware that a bad client can send arbitrary data in this field.""" button_text: str - """Text of the *web_app* keyboard button, from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.""" + """Text of the *web_app* keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.""" diff --git a/aiogram/types/web_app_info.py b/aiogram/types/web_app_info.py index 9317fae9..b315846e 100644 --- a/aiogram/types/web_app_info.py +++ b/aiogram/types/web_app_info.py @@ -5,7 +5,7 @@ from .base import TelegramObject class WebAppInfo(TelegramObject): """ - Contains information about a `Web App `_. + Describes a `Web App `_. Source: https://core.telegram.org/bots/api#webappinfo """ diff --git a/aiogram/types/webhook_info.py b/aiogram/types/webhook_info.py index a3ec68e5..e08df0d6 100644 --- a/aiogram/types/webhook_info.py +++ b/aiogram/types/webhook_info.py @@ -1,14 +1,14 @@ from __future__ import annotations import datetime -from typing import List, Optional, Union +from typing import List, Optional from .base import TelegramObject class WebhookInfo(TelegramObject): """ - Contains information about the current status of a webhook. + Describes the current status of a webhook. Source: https://core.telegram.org/bots/api#webhookinfo """ @@ -21,13 +21,13 @@ class WebhookInfo(TelegramObject): """Number of updates awaiting delivery""" ip_address: Optional[str] = None """*Optional*. Currently used webhook IP address""" - last_error_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None + last_error_date: Optional[datetime.datetime] = None """*Optional*. Unix time for the most recent error that happened when trying to deliver an update via webhook""" last_error_message: Optional[str] = None """*Optional*. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook""" last_synchronization_error_date: Optional[datetime.datetime] = None """*Optional*. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters""" max_connections: Optional[int] = None - """*Optional*. Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery""" + """*Optional*. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery""" allowed_updates: Optional[List[str]] = None """*Optional*. A list of update types the bot is subscribed to. Defaults to all update types except *chat_member*""" diff --git a/aiogram/utils/i18n/core.py b/aiogram/utils/i18n/core.py index 830ead54..db7c7979 100644 --- a/aiogram/utils/i18n/core.py +++ b/aiogram/utils/i18n/core.py @@ -68,7 +68,7 @@ class I18n(ContextInstanceMixin["I18n"]): if os.path.exists(mo_path): with open(mo_path, "rb") as fp: - translations[name] = gettext.GNUTranslations(fp) # type: ignore + translations[name] = gettext.GNUTranslations(fp) elif os.path.exists(mo_path[:-2] + "po"): # pragma: no cover raise RuntimeError(f"Found locale '{name}' but this language is not compiled!") diff --git a/docs/api/methods/add_sticker_to_set.rst b/docs/api/methods/add_sticker_to_set.rst index 68d1cbc6..8c86d09a 100644 --- a/docs/api/methods/add_sticker_to_set.rst +++ b/docs/api/methods/add_sticker_to_set.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.add_sticker_to_set import AddStickerToSet` - alias: :code:`from aiogram.methods import AddStickerToSet` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await AddStickerToSet(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/answer_callback_query.rst b/docs/api/methods/answer_callback_query.rst index 1ffad5f5..3dc5096f 100644 --- a/docs/api/methods/answer_callback_query.rst +++ b/docs/api/methods/answer_callback_query.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.answer_callback_query import AnswerCallbackQuery` - alias: :code:`from aiogram.methods import AnswerCallbackQuery` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await AnswerCallbackQuery(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/answer_inline_query.rst b/docs/api/methods/answer_inline_query.rst index a2231c5b..193f9fdf 100644 --- a/docs/api/methods/answer_inline_query.rst +++ b/docs/api/methods/answer_inline_query.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.answer_inline_query import AnswerInlineQuery` - alias: :code:`from aiogram.methods import AnswerInlineQuery` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await AnswerInlineQuery(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/answer_pre_checkout_query.rst b/docs/api/methods/answer_pre_checkout_query.rst index c332f6e6..82157af2 100644 --- a/docs/api/methods/answer_pre_checkout_query.rst +++ b/docs/api/methods/answer_pre_checkout_query.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.answer_pre_checkout_query import AnswerPreCheckoutQuery` - alias: :code:`from aiogram.methods import AnswerPreCheckoutQuery` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await AnswerPreCheckoutQuery(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/answer_shipping_query.rst b/docs/api/methods/answer_shipping_query.rst index 2b3f5212..b9ddc36c 100644 --- a/docs/api/methods/answer_shipping_query.rst +++ b/docs/api/methods/answer_shipping_query.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.answer_shipping_query import AnswerShippingQuery` - alias: :code:`from aiogram.methods import AnswerShippingQuery` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await AnswerShippingQuery(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/answer_web_app_query.rst b/docs/api/methods/answer_web_app_query.rst index a608083f..884366ee 100644 --- a/docs/api/methods/answer_web_app_query.rst +++ b/docs/api/methods/answer_web_app_query.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.answer_web_app_query import AnswerWebAppQuery` - alias: :code:`from aiogram.methods import AnswerWebAppQuery` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: SentWebAppMessage = await AnswerWebAppQuery(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/approve_chat_join_request.rst b/docs/api/methods/approve_chat_join_request.rst index 8ac4643a..490c1d5b 100644 --- a/docs/api/methods/approve_chat_join_request.rst +++ b/docs/api/methods/approve_chat_join_request.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.approve_chat_join_request import ApproveChatJoinRequest` - alias: :code:`from aiogram.methods import ApproveChatJoinRequest` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await ApproveChatJoinRequest(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/ban_chat_member.rst b/docs/api/methods/ban_chat_member.rst index 0f8edf8b..b5ff4bfe 100644 --- a/docs/api/methods/ban_chat_member.rst +++ b/docs/api/methods/ban_chat_member.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.ban_chat_member import BanChatMember` - alias: :code:`from aiogram.methods import BanChatMember` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await BanChatMember(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/ban_chat_sender_chat.rst b/docs/api/methods/ban_chat_sender_chat.rst index 5c6182eb..435fd8b9 100644 --- a/docs/api/methods/ban_chat_sender_chat.rst +++ b/docs/api/methods/ban_chat_sender_chat.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.ban_chat_sender_chat import BanChatSenderChat` - alias: :code:`from aiogram.methods import BanChatSenderChat` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await BanChatSenderChat(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/close.rst b/docs/api/methods/close.rst index 2ae15875..6c315eb4 100644 --- a/docs/api/methods/close.rst +++ b/docs/api/methods/close.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.close import Close` - alias: :code:`from aiogram.methods import Close` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await Close(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/copy_message.rst b/docs/api/methods/copy_message.rst index a4f5c9b9..ac8acb3d 100644 --- a/docs/api/methods/copy_message.rst +++ b/docs/api/methods/copy_message.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.copy_message import CopyMessage` - alias: :code:`from aiogram.methods import CopyMessage` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: MessageId = await CopyMessage(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/create_chat_invite_link.rst b/docs/api/methods/create_chat_invite_link.rst index 787eded8..af2a47b5 100644 --- a/docs/api/methods/create_chat_invite_link.rst +++ b/docs/api/methods/create_chat_invite_link.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.create_chat_invite_link import CreateChatInviteLink` - alias: :code:`from aiogram.methods import CreateChatInviteLink` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: ChatInviteLink = await CreateChatInviteLink(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/create_invoice_link.rst b/docs/api/methods/create_invoice_link.rst new file mode 100644 index 00000000..5d25aae9 --- /dev/null +++ b/docs/api/methods/create_invoice_link.rst @@ -0,0 +1,44 @@ +################# +createInvoiceLink +################# + +Returns: :obj:`str` + +.. automodule:: aiogram.methods.create_invoice_link + :members: + :member-order: bysource + :undoc-members: True + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: str = await bot.create_invoice_link(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.create_invoice_link import CreateInvoiceLink` +- alias: :code:`from aiogram.methods import CreateInvoiceLink` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: str = await bot(CreateInvoiceLink(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return CreateInvoiceLink(...) diff --git a/docs/api/methods/create_new_sticker_set.rst b/docs/api/methods/create_new_sticker_set.rst index 475c1c01..a118200b 100644 --- a/docs/api/methods/create_new_sticker_set.rst +++ b/docs/api/methods/create_new_sticker_set.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.create_new_sticker_set import CreateNewStickerSet` - alias: :code:`from aiogram.methods import CreateNewStickerSet` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await CreateNewStickerSet(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/decline_chat_join_request.rst b/docs/api/methods/decline_chat_join_request.rst index f367ec36..a0a82e99 100644 --- a/docs/api/methods/decline_chat_join_request.rst +++ b/docs/api/methods/decline_chat_join_request.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.decline_chat_join_request import DeclineChatJoinRequest` - alias: :code:`from aiogram.methods import DeclineChatJoinRequest` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await DeclineChatJoinRequest(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/delete_chat_photo.rst b/docs/api/methods/delete_chat_photo.rst index 637cef64..b80144d7 100644 --- a/docs/api/methods/delete_chat_photo.rst +++ b/docs/api/methods/delete_chat_photo.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.delete_chat_photo import DeleteChatPhoto` - alias: :code:`from aiogram.methods import DeleteChatPhoto` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await DeleteChatPhoto(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/delete_chat_sticker_set.rst b/docs/api/methods/delete_chat_sticker_set.rst index a06cc894..ef06d79d 100644 --- a/docs/api/methods/delete_chat_sticker_set.rst +++ b/docs/api/methods/delete_chat_sticker_set.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.delete_chat_sticker_set import DeleteChatStickerSet` - alias: :code:`from aiogram.methods import DeleteChatStickerSet` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await DeleteChatStickerSet(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/delete_message.rst b/docs/api/methods/delete_message.rst index 96b721e9..025954a8 100644 --- a/docs/api/methods/delete_message.rst +++ b/docs/api/methods/delete_message.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.delete_message import DeleteMessage` - alias: :code:`from aiogram.methods import DeleteMessage` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await DeleteMessage(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/delete_my_commands.rst b/docs/api/methods/delete_my_commands.rst index 5077f68c..58cfce2b 100644 --- a/docs/api/methods/delete_my_commands.rst +++ b/docs/api/methods/delete_my_commands.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.delete_my_commands import DeleteMyCommands` - alias: :code:`from aiogram.methods import DeleteMyCommands` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await DeleteMyCommands(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/delete_sticker_from_set.rst b/docs/api/methods/delete_sticker_from_set.rst index ac491710..a620464d 100644 --- a/docs/api/methods/delete_sticker_from_set.rst +++ b/docs/api/methods/delete_sticker_from_set.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.delete_sticker_from_set import DeleteStickerFromSet` - alias: :code:`from aiogram.methods import DeleteStickerFromSet` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await DeleteStickerFromSet(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/delete_webhook.rst b/docs/api/methods/delete_webhook.rst index b1f4d02c..b903296a 100644 --- a/docs/api/methods/delete_webhook.rst +++ b/docs/api/methods/delete_webhook.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.delete_webhook import DeleteWebhook` - alias: :code:`from aiogram.methods import DeleteWebhook` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await DeleteWebhook(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/edit_chat_invite_link.rst b/docs/api/methods/edit_chat_invite_link.rst index a9702e84..c72f1d10 100644 --- a/docs/api/methods/edit_chat_invite_link.rst +++ b/docs/api/methods/edit_chat_invite_link.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.edit_chat_invite_link import EditChatInviteLink` - alias: :code:`from aiogram.methods import EditChatInviteLink` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: ChatInviteLink = await EditChatInviteLink(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/edit_message_caption.rst b/docs/api/methods/edit_message_caption.rst index fb8a001a..f1a40a48 100644 --- a/docs/api/methods/edit_message_caption.rst +++ b/docs/api/methods/edit_message_caption.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.edit_message_caption import EditMessageCaption` - alias: :code:`from aiogram.methods import EditMessageCaption` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Union[Message, bool] = await EditMessageCaption(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/edit_message_live_location.rst b/docs/api/methods/edit_message_live_location.rst index 85022f03..3d9ec289 100644 --- a/docs/api/methods/edit_message_live_location.rst +++ b/docs/api/methods/edit_message_live_location.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.edit_message_live_location import EditMessageLiveLocation` - alias: :code:`from aiogram.methods import EditMessageLiveLocation` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Union[Message, bool] = await EditMessageLiveLocation(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/edit_message_media.rst b/docs/api/methods/edit_message_media.rst index 5e77467f..efd8a3cb 100644 --- a/docs/api/methods/edit_message_media.rst +++ b/docs/api/methods/edit_message_media.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.edit_message_media import EditMessageMedia` - alias: :code:`from aiogram.methods import EditMessageMedia` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Union[Message, bool] = await EditMessageMedia(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/edit_message_reply_markup.rst b/docs/api/methods/edit_message_reply_markup.rst index 34916d42..050af021 100644 --- a/docs/api/methods/edit_message_reply_markup.rst +++ b/docs/api/methods/edit_message_reply_markup.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.edit_message_reply_markup import EditMessageReplyMarkup` - alias: :code:`from aiogram.methods import EditMessageReplyMarkup` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Union[Message, bool] = await EditMessageReplyMarkup(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/edit_message_text.rst b/docs/api/methods/edit_message_text.rst index 32645b94..f75e944e 100644 --- a/docs/api/methods/edit_message_text.rst +++ b/docs/api/methods/edit_message_text.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.edit_message_text import EditMessageText` - alias: :code:`from aiogram.methods import EditMessageText` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Union[Message, bool] = await EditMessageText(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/export_chat_invite_link.rst b/docs/api/methods/export_chat_invite_link.rst index ea8c6fcd..90c02f36 100644 --- a/docs/api/methods/export_chat_invite_link.rst +++ b/docs/api/methods/export_chat_invite_link.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.export_chat_invite_link import ExportChatInviteLink` - alias: :code:`from aiogram.methods import ExportChatInviteLink` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: str = await ExportChatInviteLink(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/forward_message.rst b/docs/api/methods/forward_message.rst index fcf8fd59..2b02dfdc 100644 --- a/docs/api/methods/forward_message.rst +++ b/docs/api/methods/forward_message.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.forward_message import ForwardMessage` - alias: :code:`from aiogram.methods import ForwardMessage` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await ForwardMessage(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/get_chat.rst b/docs/api/methods/get_chat.rst index 79124ed2..dbc1143c 100644 --- a/docs/api/methods/get_chat.rst +++ b/docs/api/methods/get_chat.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.get_chat import GetChat` - alias: :code:`from aiogram.methods import GetChat` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Chat = await GetChat(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/get_chat_administrators.rst b/docs/api/methods/get_chat_administrators.rst index 558c948a..04f2b41b 100644 --- a/docs/api/methods/get_chat_administrators.rst +++ b/docs/api/methods/get_chat_administrators.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.get_chat_administrators import GetChatAdministrators` - alias: :code:`from aiogram.methods import GetChatAdministrators` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: List[Union[ChatMemberOwner, ChatMemberAdministrator, ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned]] = await GetChatAdministrators(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/get_chat_member.rst b/docs/api/methods/get_chat_member.rst index 13b58321..46ee5c04 100644 --- a/docs/api/methods/get_chat_member.rst +++ b/docs/api/methods/get_chat_member.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.get_chat_member import GetChatMember` - alias: :code:`from aiogram.methods import GetChatMember` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Union[ChatMemberOwner, ChatMemberAdministrator, ChatMemberMember, ChatMemberRestricted, ChatMemberLeft, ChatMemberBanned] = await GetChatMember(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/get_chat_member_count.rst b/docs/api/methods/get_chat_member_count.rst index 2bee4cd9..43858d92 100644 --- a/docs/api/methods/get_chat_member_count.rst +++ b/docs/api/methods/get_chat_member_count.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.get_chat_member_count import GetChatMemberCount` - alias: :code:`from aiogram.methods import GetChatMemberCount` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: int = await GetChatMemberCount(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/get_chat_members_count.rst b/docs/api/methods/get_chat_members_count.rst index 6286e845..1a11da5b 100644 --- a/docs/api/methods/get_chat_members_count.rst +++ b/docs/api/methods/get_chat_members_count.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.get_chat_members_count import GetChatMembersCount` - alias: :code:`from aiogram.methods import GetChatMembersCount` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: int = await GetChatMembersCount(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/get_chat_menu_button.rst b/docs/api/methods/get_chat_menu_button.rst index 8e3df76a..85a6c6a3 100644 --- a/docs/api/methods/get_chat_menu_button.rst +++ b/docs/api/methods/get_chat_menu_button.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.get_chat_menu_button import GetChatMenuButton` - alias: :code:`from aiogram.methods import GetChatMenuButton` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: MenuButton = await GetChatMenuButton(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/get_file.rst b/docs/api/methods/get_file.rst index ee96326b..eb9f3b7d 100644 --- a/docs/api/methods/get_file.rst +++ b/docs/api/methods/get_file.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.get_file import GetFile` - alias: :code:`from aiogram.methods import GetFile` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: File = await GetFile(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/get_game_high_scores.rst b/docs/api/methods/get_game_high_scores.rst index 4fb1f06e..d57d781d 100644 --- a/docs/api/methods/get_game_high_scores.rst +++ b/docs/api/methods/get_game_high_scores.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.get_game_high_scores import GetGameHighScores` - alias: :code:`from aiogram.methods import GetGameHighScores` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: List[GameHighScore] = await GetGameHighScores(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/get_me.rst b/docs/api/methods/get_me.rst index 7ae9d580..cf883046 100644 --- a/docs/api/methods/get_me.rst +++ b/docs/api/methods/get_me.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.get_me import GetMe` - alias: :code:`from aiogram.methods import GetMe` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: User = await GetMe(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/get_my_commands.rst b/docs/api/methods/get_my_commands.rst index 9dba9fe6..a67f1d88 100644 --- a/docs/api/methods/get_my_commands.rst +++ b/docs/api/methods/get_my_commands.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.get_my_commands import GetMyCommands` - alias: :code:`from aiogram.methods import GetMyCommands` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: List[BotCommand] = await GetMyCommands(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/get_my_default_administrator_rights.rst b/docs/api/methods/get_my_default_administrator_rights.rst index d73c54f8..5d28e41f 100644 --- a/docs/api/methods/get_my_default_administrator_rights.rst +++ b/docs/api/methods/get_my_default_administrator_rights.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.get_my_default_administrator_rights import GetMyDefaultAdministratorRights` - alias: :code:`from aiogram.methods import GetMyDefaultAdministratorRights` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: ChatAdministratorRights = await GetMyDefaultAdministratorRights(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/get_sticker_set.rst b/docs/api/methods/get_sticker_set.rst index a1feb38c..2b131b21 100644 --- a/docs/api/methods/get_sticker_set.rst +++ b/docs/api/methods/get_sticker_set.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.get_sticker_set import GetStickerSet` - alias: :code:`from aiogram.methods import GetStickerSet` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: StickerSet = await GetStickerSet(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/get_updates.rst b/docs/api/methods/get_updates.rst index 6ff33d31..7d14ee1e 100644 --- a/docs/api/methods/get_updates.rst +++ b/docs/api/methods/get_updates.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.get_updates import GetUpdates` - alias: :code:`from aiogram.methods import GetUpdates` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: List[Update] = await GetUpdates(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/get_user_profile_photos.rst b/docs/api/methods/get_user_profile_photos.rst index dab76989..3ab9fe88 100644 --- a/docs/api/methods/get_user_profile_photos.rst +++ b/docs/api/methods/get_user_profile_photos.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.get_user_profile_photos import GetUserProfilePhotos` - alias: :code:`from aiogram.methods import GetUserProfilePhotos` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: UserProfilePhotos = await GetUserProfilePhotos(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/get_webhook_info.rst b/docs/api/methods/get_webhook_info.rst index 519e1207..d038a261 100644 --- a/docs/api/methods/get_webhook_info.rst +++ b/docs/api/methods/get_webhook_info.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.get_webhook_info import GetWebhookInfo` - alias: :code:`from aiogram.methods import GetWebhookInfo` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: WebhookInfo = await GetWebhookInfo(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/index.rst b/docs/api/methods/index.rst index 6c778282..0fa45e7c 100644 --- a/docs/api/methods/index.rst +++ b/docs/api/methods/index.rst @@ -131,6 +131,7 @@ Payments :maxdepth: 1 send_invoice + create_invoice_link answer_shipping_query answer_pre_checkout_query diff --git a/docs/api/methods/kick_chat_member.rst b/docs/api/methods/kick_chat_member.rst index da73a535..5c80b773 100644 --- a/docs/api/methods/kick_chat_member.rst +++ b/docs/api/methods/kick_chat_member.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.kick_chat_member import KickChatMember` - alias: :code:`from aiogram.methods import KickChatMember` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await KickChatMember(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/leave_chat.rst b/docs/api/methods/leave_chat.rst index a78dce7e..c88ee520 100644 --- a/docs/api/methods/leave_chat.rst +++ b/docs/api/methods/leave_chat.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.leave_chat import LeaveChat` - alias: :code:`from aiogram.methods import LeaveChat` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await LeaveChat(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/log_out.rst b/docs/api/methods/log_out.rst index 0049c3f2..683cf19a 100644 --- a/docs/api/methods/log_out.rst +++ b/docs/api/methods/log_out.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.log_out import LogOut` - alias: :code:`from aiogram.methods import LogOut` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await LogOut(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/pin_chat_message.rst b/docs/api/methods/pin_chat_message.rst index 717f86a1..ec730278 100644 --- a/docs/api/methods/pin_chat_message.rst +++ b/docs/api/methods/pin_chat_message.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.pin_chat_message import PinChatMessage` - alias: :code:`from aiogram.methods import PinChatMessage` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await PinChatMessage(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/promote_chat_member.rst b/docs/api/methods/promote_chat_member.rst index 67bf3671..e3081d97 100644 --- a/docs/api/methods/promote_chat_member.rst +++ b/docs/api/methods/promote_chat_member.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.promote_chat_member import PromoteChatMember` - alias: :code:`from aiogram.methods import PromoteChatMember` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await PromoteChatMember(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/restrict_chat_member.rst b/docs/api/methods/restrict_chat_member.rst index a93c4c92..0cf2a5af 100644 --- a/docs/api/methods/restrict_chat_member.rst +++ b/docs/api/methods/restrict_chat_member.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.restrict_chat_member import RestrictChatMember` - alias: :code:`from aiogram.methods import RestrictChatMember` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await RestrictChatMember(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/revoke_chat_invite_link.rst b/docs/api/methods/revoke_chat_invite_link.rst index 530133f8..d643c901 100644 --- a/docs/api/methods/revoke_chat_invite_link.rst +++ b/docs/api/methods/revoke_chat_invite_link.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.revoke_chat_invite_link import RevokeChatInviteLink` - alias: :code:`from aiogram.methods import RevokeChatInviteLink` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: ChatInviteLink = await RevokeChatInviteLink(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/send_animation.rst b/docs/api/methods/send_animation.rst index 2e6284b5..4372fc33 100644 --- a/docs/api/methods/send_animation.rst +++ b/docs/api/methods/send_animation.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.send_animation import SendAnimation` - alias: :code:`from aiogram.methods import SendAnimation` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendAnimation(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/send_audio.rst b/docs/api/methods/send_audio.rst index ce023e84..8aa40c8f 100644 --- a/docs/api/methods/send_audio.rst +++ b/docs/api/methods/send_audio.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.send_audio import SendAudio` - alias: :code:`from aiogram.methods import SendAudio` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendAudio(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/send_contact.rst b/docs/api/methods/send_contact.rst index 48cae668..ce576007 100644 --- a/docs/api/methods/send_contact.rst +++ b/docs/api/methods/send_contact.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.send_contact import SendContact` - alias: :code:`from aiogram.methods import SendContact` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendContact(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/send_dice.rst b/docs/api/methods/send_dice.rst index 2774fd6d..dbb0fd05 100644 --- a/docs/api/methods/send_dice.rst +++ b/docs/api/methods/send_dice.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.send_dice import SendDice` - alias: :code:`from aiogram.methods import SendDice` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendDice(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/send_document.rst b/docs/api/methods/send_document.rst index 5134bcde..1fb86b4e 100644 --- a/docs/api/methods/send_document.rst +++ b/docs/api/methods/send_document.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.send_document import SendDocument` - alias: :code:`from aiogram.methods import SendDocument` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendDocument(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/send_game.rst b/docs/api/methods/send_game.rst index 149e3131..21cc7a8a 100644 --- a/docs/api/methods/send_game.rst +++ b/docs/api/methods/send_game.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.send_game import SendGame` - alias: :code:`from aiogram.methods import SendGame` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendGame(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/send_invoice.rst b/docs/api/methods/send_invoice.rst index 90132a46..e7fa0904 100644 --- a/docs/api/methods/send_invoice.rst +++ b/docs/api/methods/send_invoice.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.send_invoice import SendInvoice` - alias: :code:`from aiogram.methods import SendInvoice` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendInvoice(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/send_location.rst b/docs/api/methods/send_location.rst index 769d6724..d4dbfeb2 100644 --- a/docs/api/methods/send_location.rst +++ b/docs/api/methods/send_location.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.send_location import SendLocation` - alias: :code:`from aiogram.methods import SendLocation` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendLocation(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/send_media_group.rst b/docs/api/methods/send_media_group.rst index c962e049..b57701d7 100644 --- a/docs/api/methods/send_media_group.rst +++ b/docs/api/methods/send_media_group.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.send_media_group import SendMediaGroup` - alias: :code:`from aiogram.methods import SendMediaGroup` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: List[Message] = await SendMediaGroup(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/send_message.rst b/docs/api/methods/send_message.rst index c054b382..4f72f163 100644 --- a/docs/api/methods/send_message.rst +++ b/docs/api/methods/send_message.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.send_message import SendMessage` - alias: :code:`from aiogram.methods import SendMessage` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendMessage(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/send_photo.rst b/docs/api/methods/send_photo.rst index f6dfd0f5..38d54218 100644 --- a/docs/api/methods/send_photo.rst +++ b/docs/api/methods/send_photo.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.send_photo import SendPhoto` - alias: :code:`from aiogram.methods import SendPhoto` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendPhoto(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/send_poll.rst b/docs/api/methods/send_poll.rst index 7261399b..29e0a791 100644 --- a/docs/api/methods/send_poll.rst +++ b/docs/api/methods/send_poll.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.send_poll import SendPoll` - alias: :code:`from aiogram.methods import SendPoll` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendPoll(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/send_sticker.rst b/docs/api/methods/send_sticker.rst index 9c27417b..4a1212e8 100644 --- a/docs/api/methods/send_sticker.rst +++ b/docs/api/methods/send_sticker.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.send_sticker import SendSticker` - alias: :code:`from aiogram.methods import SendSticker` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendSticker(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/send_venue.rst b/docs/api/methods/send_venue.rst index f87100de..5a8e0d3c 100644 --- a/docs/api/methods/send_venue.rst +++ b/docs/api/methods/send_venue.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.send_venue import SendVenue` - alias: :code:`from aiogram.methods import SendVenue` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendVenue(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/send_video.rst b/docs/api/methods/send_video.rst index 8fe6ed40..2ee8a3dd 100644 --- a/docs/api/methods/send_video.rst +++ b/docs/api/methods/send_video.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.send_video import SendVideo` - alias: :code:`from aiogram.methods import SendVideo` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendVideo(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/send_video_note.rst b/docs/api/methods/send_video_note.rst index f10f534e..d53d91e0 100644 --- a/docs/api/methods/send_video_note.rst +++ b/docs/api/methods/send_video_note.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.send_video_note import SendVideoNote` - alias: :code:`from aiogram.methods import SendVideoNote` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendVideoNote(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/send_voice.rst b/docs/api/methods/send_voice.rst index b3583bb1..397a4e75 100644 --- a/docs/api/methods/send_voice.rst +++ b/docs/api/methods/send_voice.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.send_voice import SendVoice` - alias: :code:`from aiogram.methods import SendVoice` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: Message = await SendVoice(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/set_chat_administrator_custom_title.rst b/docs/api/methods/set_chat_administrator_custom_title.rst index ca73df29..7b3deaf0 100644 --- a/docs/api/methods/set_chat_administrator_custom_title.rst +++ b/docs/api/methods/set_chat_administrator_custom_title.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.set_chat_administrator_custom_title import SetChatAdministratorCustomTitle` - alias: :code:`from aiogram.methods import SetChatAdministratorCustomTitle` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await SetChatAdministratorCustomTitle(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/set_chat_description.rst b/docs/api/methods/set_chat_description.rst index 0625516c..2cb8f08e 100644 --- a/docs/api/methods/set_chat_description.rst +++ b/docs/api/methods/set_chat_description.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.set_chat_description import SetChatDescription` - alias: :code:`from aiogram.methods import SetChatDescription` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await SetChatDescription(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/set_chat_menu_button.rst b/docs/api/methods/set_chat_menu_button.rst index 6a60fae9..671313fe 100644 --- a/docs/api/methods/set_chat_menu_button.rst +++ b/docs/api/methods/set_chat_menu_button.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.set_chat_menu_button import SetChatMenuButton` - alias: :code:`from aiogram.methods import SetChatMenuButton` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await SetChatMenuButton(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/set_chat_permissions.rst b/docs/api/methods/set_chat_permissions.rst index b287a7e2..8e546011 100644 --- a/docs/api/methods/set_chat_permissions.rst +++ b/docs/api/methods/set_chat_permissions.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.set_chat_permissions import SetChatPermissions` - alias: :code:`from aiogram.methods import SetChatPermissions` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await SetChatPermissions(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/docs/api/methods/set_chat_photo.rst b/docs/api/methods/set_chat_photo.rst index 536696e8..99ff36c2 100644 --- a/docs/api/methods/set_chat_photo.rst +++ b/docs/api/methods/set_chat_photo.rst @@ -29,13 +29,6 @@ Imports: - :code:`from aiogram.methods.set_chat_photo import SetChatPhoto` - alias: :code:`from aiogram.methods import SetChatPhoto` -In handlers with current bot ----------------------------- - -.. code-block:: python - - result: bool = await SetChatPhoto(...) - With specific bot ~~~~~~~~~~~~~~~~~ diff --git a/poetry.lock b/poetry.lock index e3ebed69..50ccb364 100644 --- a/poetry.lock +++ b/poetry.lock @@ -58,14 +58,6 @@ category = "main" optional = true python-versions = "*" -[[package]] -name = "appnope" -version = "0.1.3" -description = "Disable App Nap on macOS >= 10.9" -category = "dev" -optional = false -python-versions = "*" - [[package]] name = "aresponses" version = "2.1.5" @@ -78,20 +70,6 @@ python-versions = ">=3.6" aiohttp = ">=3.1.0,<4.0.0" pytest-asyncio = "*" -[[package]] -name = "asttokens" -version = "2.0.5" -description = "Annotate AST trees with source code positions" -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -six = "*" - -[package.extras] -test = ["astroid", "pytest"] - [[package]] name = "async-timeout" version = "4.0.2" @@ -141,14 +119,6 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [package.dependencies] pytz = ">=2015.7" -[[package]] -name = "backcall" -version = "0.2.0" -description = "Specifications for callback functions passed in to an API" -category = "dev" -optional = false -python-versions = "*" - [[package]] name = "beautifulsoup4" version = "4.11.1" @@ -191,7 +161,7 @@ name = "certifi" version = "2021.10.8" description = "Python package for providing Mozilla's CA Bundle." category = "main" -optional = false +optional = true python-versions = "*" [[package]] @@ -245,26 +215,18 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "coverage" -version = "6.3.2" +version = "6.4.1" description = "Code coverage measurement for Python" category = "dev" optional = false python-versions = ">=3.7" [package.dependencies] -tomli = {version = "*", optional = true, markers = "extra == \"toml\""} +tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.11.0a6\" and extra == \"toml\""} [package.extras] toml = ["tomli"] -[[package]] -name = "decorator" -version = "5.1.1" -description = "Decorators for Humans" -category = "dev" -optional = false -python-versions = ">=3.5" - [[package]] name = "deprecated" version = "1.2.13" @@ -295,14 +257,6 @@ category = "main" optional = true python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -[[package]] -name = "executing" -version = "0.8.3" -description = "Get the currently executing AST node of a frame, and other information" -category = "dev" -optional = false -python-versions = "*" - [[package]] name = "filelock" version = "3.6.0" @@ -338,16 +292,17 @@ python-versions = ">=3.7" [[package]] name = "furo" -version = "2022.4.7" +version = "2022.6.21" description = "A clean customisable Sphinx documentation theme." category = "main" optional = true -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] beautifulsoup4 = "*" -pygments = ">=2.7,<3.0" -sphinx = ">=4.0,<5.0" +pygments = "*" +sphinx = ">=4.0,<6.0" +sphinx-basic-ng = "*" [[package]] name = "identify" @@ -411,41 +366,6 @@ category = "dev" optional = false python-versions = "*" -[[package]] -name = "ipython" -version = "8.2.0" -description = "IPython: Productive Interactive Computing" -category = "dev" -optional = false -python-versions = ">=3.8" - -[package.dependencies] -appnope = {version = "*", markers = "sys_platform == \"darwin\""} -backcall = "*" -colorama = {version = "*", markers = "sys_platform == \"win32\""} -decorator = "*" -jedi = ">=0.16" -matplotlib-inline = "*" -pexpect = {version = ">4.3", markers = "sys_platform != \"win32\""} -pickleshare = "*" -prompt-toolkit = ">=2.0.0,<3.0.0 || >3.0.0,<3.0.1 || >3.0.1,<3.1.0" -pygments = ">=2.4.0" -stack-data = "*" -traitlets = ">=5" - -[package.extras] -all = ["black", "Sphinx (>=1.3)", "ipykernel", "nbconvert", "nbformat", "ipywidgets", "notebook", "ipyparallel", "qtconsole", "pytest (<7.1)", "pytest-asyncio", "testpath", "curio", "matplotlib (!=3.2.0)", "numpy (>=1.19)", "pandas", "trio"] -black = ["black"] -doc = ["Sphinx (>=1.3)"] -kernel = ["ipykernel"] -nbconvert = ["nbconvert"] -nbformat = ["nbformat"] -notebook = ["ipywidgets", "notebook"] -parallel = ["ipyparallel"] -qtconsole = ["qtconsole"] -test = ["pytest (<7.1)", "pytest-asyncio", "testpath"] -test_extra = ["pytest (<7.1)", "pytest-asyncio", "testpath", "curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.19)", "pandas", "trio"] - [[package]] name = "isort" version = "5.10.1" @@ -460,21 +380,6 @@ requirements_deprecated_finder = ["pipreqs", "pip-api"] colors = ["colorama (>=0.4.3,<0.5.0)"] plugins = ["setuptools"] -[[package]] -name = "jedi" -version = "0.18.1" -description = "An autocompletion tool for Python that can be used for text editors." -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -parso = ">=0.8.0,<0.9.0" - -[package.extras] -qa = ["flake8 (==3.8.3)", "mypy (==0.782)"] -testing = ["Django (<3.1)", "colorama", "docopt", "pytest (<7.0.0)"] - [[package]] name = "jinja2" version = "3.1.1" @@ -542,17 +447,6 @@ category = "main" optional = true python-versions = ">=3.7" -[[package]] -name = "matplotlib-inline" -version = "0.1.3" -description = "Inline Matplotlib backend for Jupyter" -category = "dev" -optional = false -python-versions = ">=3.5" - -[package.dependencies] -traitlets = "*" - [[package]] name = "mccabe" version = "0.6.1" @@ -571,7 +465,7 @@ python-versions = ">=3.7" [[package]] name = "mypy" -version = "0.942" +version = "0.961" description = "Optional static typing for Python" category = "dev" optional = false @@ -579,7 +473,7 @@ python-versions = ">=3.6" [package.dependencies] mypy-extensions = ">=0.4.3" -tomli = ">=1.1.0" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} typing-extensions = ">=3.10" [package.extras] @@ -614,18 +508,6 @@ python-versions = ">=3.6" [package.dependencies] pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" -[[package]] -name = "parso" -version = "0.8.3" -description = "A Python Parser" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.extras] -qa = ["flake8 (==3.8.3)", "mypy (==0.782)"] -testing = ["docopt", "pytest (<6.0.0)"] - [[package]] name = "pathspec" version = "0.9.0" @@ -634,25 +516,6 @@ category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" -[[package]] -name = "pexpect" -version = "4.8.0" -description = "Pexpect allows easy control of interactive console applications." -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -ptyprocess = ">=0.5" - -[[package]] -name = "pickleshare" -version = "0.7.5" -description = "Tiny 'shelve'-like database with concurrency support" -category = "dev" -optional = false -python-versions = "*" - [[package]] name = "platformdirs" version = "2.5.1" @@ -679,7 +542,7 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "pre-commit" -version = "2.18.1" +version = "2.19.0" description = "A framework for managing and maintaining multi-language pre-commit hooks." category = "dev" optional = false @@ -693,36 +556,6 @@ pyyaml = ">=5.1" toml = "*" virtualenv = ">=20.0.8" -[[package]] -name = "prompt-toolkit" -version = "3.0.29" -description = "Library for building powerful interactive command lines in Python" -category = "dev" -optional = false -python-versions = ">=3.6.2" - -[package.dependencies] -wcwidth = "*" - -[[package]] -name = "ptyprocess" -version = "0.7.0" -description = "Run a subprocess in a pseudo terminal" -category = "dev" -optional = false -python-versions = "*" - -[[package]] -name = "pure-eval" -version = "0.2.2" -description = "Safely evaluate AST nodes without side effects" -category = "dev" -optional = false -python-versions = "*" - -[package.extras] -tests = ["pytest"] - [[package]] name = "py" version = "1.11.0" @@ -741,8 +574,8 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "pydantic" -version = "1.9.0" -description = "Data validation and settings management using python 3.6 type hinting" +version = "1.9.1" +description = "Data validation and settings management using python type hints" category = "main" optional = false python-versions = ">=3.6.1" @@ -764,22 +597,22 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "pygments" -version = "2.11.2" +version = "2.12.0" description = "Pygments is a syntax highlighting package written in Python." category = "main" -optional = false -python-versions = ">=3.5" +optional = true +python-versions = ">=3.6" [[package]] name = "pymdown-extensions" -version = "9.3" +version = "9.5" description = "Extension pack for Python Markdown." category = "main" optional = true python-versions = ">=3.7" [package.dependencies] -Markdown = ">=3.2" +markdown = ">=3.2" [[package]] name = "pyparsing" @@ -894,7 +727,7 @@ pytest = ">=7.1.1,<8.0.0" [[package]] name = "pytest-mock" -version = "3.7.0" +version = "3.8.1" description = "Thin-wrapper around the mock package for easier use with pytest" category = "dev" optional = false @@ -961,7 +794,7 @@ python-versions = ">=3.6" [[package]] name = "redis" -version = "4.2.2" +version = "4.3.3" description = "Python client for Redis database and key-value store" category = "main" optional = true @@ -994,36 +827,6 @@ urllib3 = ">=1.21.1,<1.27" socks = ["PySocks (>=1.5.6,!=1.5.7)", "win-inet-pton"] use_chardet_on_py3 = ["chardet (>=3.0.2,<5)"] -[[package]] -name = "sentry-sdk" -version = "1.5.8" -description = "Python client for Sentry (https://sentry.io)" -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -certifi = "*" -urllib3 = ">=1.10.0" - -[package.extras] -aiohttp = ["aiohttp (>=3.5)"] -beam = ["apache-beam (>=2.12)"] -bottle = ["bottle (>=0.12.13)"] -celery = ["celery (>=3)"] -chalice = ["chalice (>=1.16.0)"] -django = ["django (>=1.8)"] -falcon = ["falcon (>=1.4)"] -flask = ["flask (>=0.11)", "blinker (>=1.1)"] -httpx = ["httpx (>=0.16.0)"] -pure_eval = ["pure-eval", "executing", "asttokens"] -pyspark = ["pyspark (>=2.4.4)"] -quart = ["quart (>=0.16.1)", "blinker (>=1.1)"] -rq = ["rq (>=0.6)"] -sanic = ["sanic (>=0.8)"] -sqlalchemy = ["sqlalchemy (>=1.2)"] -tornado = ["tornado (>=5)"] - [[package]] name = "six" version = "1.16.0" @@ -1096,6 +899,20 @@ sphinx = "*" [package.extras] test = ["pytest", "pytest-cov"] +[[package]] +name = "sphinx-basic-ng" +version = "0.0.1a11" +description = "A modern skeleton for Sphinx themes." +category = "main" +optional = true +python-versions = ">=3.7" + +[package.dependencies] +sphinx = ">=4.0,<6.0" + +[package.extras] +docs = ["furo", "myst-parser", "sphinx-copybutton", "sphinx-inline-tabs", "ipython"] + [[package]] name = "sphinx-copybutton" version = "0.5.0" @@ -1227,22 +1044,6 @@ python-versions = ">=3.5" lint = ["flake8", "mypy", "docutils-stubs"] test = ["pytest"] -[[package]] -name = "stack-data" -version = "0.2.0" -description = "Extract data from python stack frames and tracebacks for informative displays" -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -asttokens = "*" -executing = "*" -pure-eval = "*" - -[package.extras] -tests = ["pytest", "typeguard", "pygments", "littleutils", "cython"] - [[package]] name = "toml" version = "0.10.2" @@ -1285,31 +1086,20 @@ tomli = {version = "*", markers = "python_version >= \"3.6\""} [package.extras] dev = ["packaging"] -[[package]] -name = "traitlets" -version = "5.1.1" -description = "Traitlets Python configuration system" -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.extras] -test = ["pytest"] - [[package]] name = "typing-extensions" -version = "4.1.1" -description = "Backported and Experimental Type Hints for Python 3.6+" +version = "4.2.0" +description = "Backported and Experimental Type Hints for Python 3.7+" category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [[package]] name = "urllib3" version = "1.26.9" description = "HTTP library with thread-safe connection pooling, file post, and more." category = "main" -optional = false +optional = true python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" [package.extras] @@ -1348,14 +1138,6 @@ six = ">=1.9.0,<2" docs = ["proselint (>=0.10.2)", "sphinx (>=3)", "sphinx-argparse (>=0.2.5)", "sphinx-rtd-theme (>=0.4.3)", "towncrier (>=21.3)"] testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)", "packaging (>=20.0)"] -[[package]] -name = "wcwidth" -version = "0.2.5" -description = "Measures the displayed width of unicode strings in a terminal" -category = "dev" -optional = false -python-versions = "*" - [[package]] name = "wrapt" version = "1.14.0" @@ -1398,7 +1180,7 @@ redis = ["redis"] [metadata] lock-version = "1.1" python-versions = "^3.8" -content-hash = "d3a0b716a9dcb5353de9ef0587a49025da4351eb68a4327c0b3c8a24791251ee" +content-hash = "f236269d4c2c6589474cb1bd028ef42ebbb424bc77062db6c16f0a5b6e542d4c" [metadata.files] aiofiles = [ @@ -1491,18 +1273,10 @@ alabaster = [ {file = "alabaster-0.7.12-py2.py3-none-any.whl", hash = "sha256:446438bdcca0e05bd45ea2de1668c1d9b032e1a9154c2c259092d77031ddd359"}, {file = "alabaster-0.7.12.tar.gz", hash = "sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"}, ] -appnope = [ - {file = "appnope-0.1.3-py2.py3-none-any.whl", hash = "sha256:265a455292d0bd8a72453494fa24df5a11eb18373a60c7c0430889f22548605e"}, - {file = "appnope-0.1.3.tar.gz", hash = "sha256:02bd91c4de869fbb1e1c50aafc4098827a7a54ab2f39d9dcba6c9547ed920e24"}, -] aresponses = [ {file = "aresponses-2.1.5-py3-none-any.whl", hash = "sha256:06161209a39880aaf8ec3c67ab76d677aaea41944672e6a3e23a4464544879b1"}, {file = "aresponses-2.1.5.tar.gz", hash = "sha256:16535e5d24302eab194e15edd18b9e126e1fb70cd84049e63eb6b15c89e16936"}, ] -asttokens = [ - {file = "asttokens-2.0.5-py2.py3-none-any.whl", hash = "sha256:0844691e88552595a6f4a4281a9f7f79b8dd45ca4ccea82e5e05b4bbdb76705c"}, - {file = "asttokens-2.0.5.tar.gz", hash = "sha256:9a54c114f02c7a9480d56550932546a3f1fe71d8a02f1bc7ccd0ee3ee35cf4d5"}, -] async-timeout = [ {file = "async-timeout-4.0.2.tar.gz", hash = "sha256:2163e1640ddb52b7a8c80d0a67a08587e5d245cc9c553a74a847056bc2976b15"}, {file = "async_timeout-4.0.2-py3-none-any.whl", hash = "sha256:8ca1e4fcf50d07413d66d1a5e416e42cfdf5851c981d679a09851a6853383b3c"}, @@ -1523,10 +1297,6 @@ babel = [ {file = "Babel-2.9.1-py2.py3-none-any.whl", hash = "sha256:ab49e12b91d937cd11f0b67cb259a57ab4ad2b59ac7a3b41d6c06c0ac5b0def9"}, {file = "Babel-2.9.1.tar.gz", hash = "sha256:bc0c176f9f6a994582230df350aa6e05ba2ebe4b3ac317eab29d9be5d2768da0"}, ] -backcall = [ - {file = "backcall-0.2.0-py2.py3-none-any.whl", hash = "sha256:fbbce6a29f263178a1f7915c1940bde0ec2b2a967566fe1c65c1dfb7422bd255"}, - {file = "backcall-0.2.0.tar.gz", hash = "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e"}, -] beautifulsoup4 = [ {file = "beautifulsoup4-4.11.1-py3-none-any.whl", hash = "sha256:58d5c3d29f5a36ffeb94f02f0d786cd53014cf9b3b3951d42e0080d8a9498d30"}, {file = "beautifulsoup4-4.11.1.tar.gz", hash = "sha256:ad9aa55b65ef2808eb405f46cf74df7fcb7044d5cbc26487f96eb2ef2e436693"}, @@ -1580,51 +1350,47 @@ colorama = [ {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, ] coverage = [ - {file = "coverage-6.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9b27d894748475fa858f9597c0ee1d4829f44683f3813633aaf94b19cb5453cf"}, - {file = "coverage-6.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:37d1141ad6b2466a7b53a22e08fe76994c2d35a5b6b469590424a9953155afac"}, - {file = "coverage-6.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f9987b0354b06d4df0f4d3e0ec1ae76d7ce7cbca9a2f98c25041eb79eec766f1"}, - {file = "coverage-6.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:26e2deacd414fc2f97dd9f7676ee3eaecd299ca751412d89f40bc01557a6b1b4"}, - {file = "coverage-6.3.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4dd8bafa458b5c7d061540f1ee9f18025a68e2d8471b3e858a9dad47c8d41903"}, - {file = "coverage-6.3.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:46191097ebc381fbf89bdce207a6c107ac4ec0890d8d20f3360345ff5976155c"}, - {file = "coverage-6.3.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:6f89d05e028d274ce4fa1a86887b071ae1755082ef94a6740238cd7a8178804f"}, - {file = "coverage-6.3.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:58303469e9a272b4abdb9e302a780072c0633cdcc0165db7eec0f9e32f901e05"}, - {file = "coverage-6.3.2-cp310-cp310-win32.whl", hash = "sha256:2fea046bfb455510e05be95e879f0e768d45c10c11509e20e06d8fcaa31d9e39"}, - {file = "coverage-6.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:a2a8b8bcc399edb4347a5ca8b9b87e7524c0967b335fbb08a83c8421489ddee1"}, - {file = "coverage-6.3.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:f1555ea6d6da108e1999b2463ea1003fe03f29213e459145e70edbaf3e004aaa"}, - {file = "coverage-6.3.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e5f4e1edcf57ce94e5475fe09e5afa3e3145081318e5fd1a43a6b4539a97e518"}, - {file = "coverage-6.3.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7a15dc0a14008f1da3d1ebd44bdda3e357dbabdf5a0b5034d38fcde0b5c234b7"}, - {file = "coverage-6.3.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:21b7745788866028adeb1e0eca3bf1101109e2dc58456cb49d2d9b99a8c516e6"}, - {file = "coverage-6.3.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:8ce257cac556cb03be4a248d92ed36904a59a4a5ff55a994e92214cde15c5bad"}, - {file = "coverage-6.3.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:b0be84e5a6209858a1d3e8d1806c46214e867ce1b0fd32e4ea03f4bd8b2e3359"}, - {file = "coverage-6.3.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:acf53bc2cf7282ab9b8ba346746afe703474004d9e566ad164c91a7a59f188a4"}, - {file = "coverage-6.3.2-cp37-cp37m-win32.whl", hash = "sha256:8bdde1177f2311ee552f47ae6e5aa7750c0e3291ca6b75f71f7ffe1f1dab3dca"}, - {file = "coverage-6.3.2-cp37-cp37m-win_amd64.whl", hash = "sha256:b31651d018b23ec463e95cf10070d0b2c548aa950a03d0b559eaa11c7e5a6fa3"}, - {file = "coverage-6.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:07e6db90cd9686c767dcc593dff16c8c09f9814f5e9c51034066cad3373b914d"}, - {file = "coverage-6.3.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:2c6dbb42f3ad25760010c45191e9757e7dce981cbfb90e42feef301d71540059"}, - {file = "coverage-6.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c76aeef1b95aff3905fb2ae2d96e319caca5b76fa41d3470b19d4e4a3a313512"}, - {file = "coverage-6.3.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8cf5cfcb1521dc3255d845d9dca3ff204b3229401994ef8d1984b32746bb45ca"}, - {file = "coverage-6.3.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8fbbdc8d55990eac1b0919ca69eb5a988a802b854488c34b8f37f3e2025fa90d"}, - {file = "coverage-6.3.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:ec6bc7fe73a938933d4178c9b23c4e0568e43e220aef9472c4f6044bfc6dd0f0"}, - {file = "coverage-6.3.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:9baff2a45ae1f17c8078452e9e5962e518eab705e50a0aa8083733ea7d45f3a6"}, - {file = "coverage-6.3.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:fd9e830e9d8d89b20ab1e5af09b32d33e1a08ef4c4e14411e559556fd788e6b2"}, - {file = "coverage-6.3.2-cp38-cp38-win32.whl", hash = "sha256:f7331dbf301b7289013175087636bbaf5b2405e57259dd2c42fdcc9fcc47325e"}, - {file = "coverage-6.3.2-cp38-cp38-win_amd64.whl", hash = "sha256:68353fe7cdf91f109fc7d474461b46e7f1f14e533e911a2a2cbb8b0fc8613cf1"}, - {file = "coverage-6.3.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b78e5afb39941572209f71866aa0b206c12f0109835aa0d601e41552f9b3e620"}, - {file = "coverage-6.3.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4e21876082ed887baed0146fe222f861b5815455ada3b33b890f4105d806128d"}, - {file = "coverage-6.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:34626a7eee2a3da12af0507780bb51eb52dca0e1751fd1471d0810539cefb536"}, - {file = "coverage-6.3.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1ebf730d2381158ecf3dfd4453fbca0613e16eaa547b4170e2450c9707665ce7"}, - {file = "coverage-6.3.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd6fe30bd519694b356cbfcaca9bd5c1737cddd20778c6a581ae20dc8c04def2"}, - {file = "coverage-6.3.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:96f8a1cb43ca1422f36492bebe63312d396491a9165ed3b9231e778d43a7fca4"}, - {file = "coverage-6.3.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:dd035edafefee4d573140a76fdc785dc38829fe5a455c4bb12bac8c20cfc3d69"}, - {file = "coverage-6.3.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5ca5aeb4344b30d0bec47481536b8ba1181d50dbe783b0e4ad03c95dc1296684"}, - {file = "coverage-6.3.2-cp39-cp39-win32.whl", hash = "sha256:f5fa5803f47e095d7ad8443d28b01d48c0359484fec1b9d8606d0e3282084bc4"}, - {file = "coverage-6.3.2-cp39-cp39-win_amd64.whl", hash = "sha256:9548f10d8be799551eb3a9c74bbf2b4934ddb330e08a73320123c07f95cc2d92"}, - {file = "coverage-6.3.2-pp36.pp37.pp38-none-any.whl", hash = "sha256:18d520c6860515a771708937d2f78f63cc47ab3b80cb78e86573b0a760161faf"}, - {file = "coverage-6.3.2.tar.gz", hash = "sha256:03e2a7826086b91ef345ff18742ee9fc47a6839ccd517061ef8fa1976e652ce9"}, -] -decorator = [ - {file = "decorator-5.1.1-py3-none-any.whl", hash = "sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186"}, - {file = "decorator-5.1.1.tar.gz", hash = "sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330"}, + {file = "coverage-6.4.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f1d5aa2703e1dab4ae6cf416eb0095304f49d004c39e9db1d86f57924f43006b"}, + {file = "coverage-6.4.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4ce1b258493cbf8aec43e9b50d89982346b98e9ffdfaae8ae5793bc112fb0068"}, + {file = "coverage-6.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:83c4e737f60c6936460c5be330d296dd5b48b3963f48634c53b3f7deb0f34ec4"}, + {file = "coverage-6.4.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:84e65ef149028516c6d64461b95a8dbcfce95cfd5b9eb634320596173332ea84"}, + {file = "coverage-6.4.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f69718750eaae75efe506406c490d6fc5a6161d047206cc63ce25527e8a3adad"}, + {file = "coverage-6.4.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e57816f8ffe46b1df8f12e1b348f06d164fd5219beba7d9433ba79608ef011cc"}, + {file = "coverage-6.4.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:01c5615d13f3dd3aa8543afc069e5319cfa0c7d712f6e04b920431e5c564a749"}, + {file = "coverage-6.4.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:75ab269400706fab15981fd4bd5080c56bd5cc07c3bccb86aab5e1d5a88dc8f4"}, + {file = "coverage-6.4.1-cp310-cp310-win32.whl", hash = "sha256:a7f3049243783df2e6cc6deafc49ea123522b59f464831476d3d1448e30d72df"}, + {file = "coverage-6.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:ee2ddcac99b2d2aec413e36d7a429ae9ebcadf912946b13ffa88e7d4c9b712d6"}, + {file = "coverage-6.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:fb73e0011b8793c053bfa85e53129ba5f0250fdc0392c1591fd35d915ec75c46"}, + {file = "coverage-6.4.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:106c16dfe494de3193ec55cac9640dd039b66e196e4641fa8ac396181578b982"}, + {file = "coverage-6.4.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:87f4f3df85aa39da00fd3ec4b5abeb7407e82b68c7c5ad181308b0e2526da5d4"}, + {file = "coverage-6.4.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:961e2fb0680b4f5ad63234e0bf55dfb90d302740ae9c7ed0120677a94a1590cb"}, + {file = "coverage-6.4.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:cec3a0f75c8f1031825e19cd86ee787e87cf03e4fd2865c79c057092e69e3a3b"}, + {file = "coverage-6.4.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:129cd05ba6f0d08a766d942a9ed4b29283aff7b2cccf5b7ce279d50796860bb3"}, + {file = "coverage-6.4.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:bf5601c33213d3cb19d17a796f8a14a9eaa5e87629a53979a5981e3e3ae166f6"}, + {file = "coverage-6.4.1-cp37-cp37m-win32.whl", hash = "sha256:269eaa2c20a13a5bf17558d4dc91a8d078c4fa1872f25303dddcbba3a813085e"}, + {file = "coverage-6.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:f02cbbf8119db68455b9d763f2f8737bb7db7e43720afa07d8eb1604e5c5ae28"}, + {file = "coverage-6.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ffa9297c3a453fba4717d06df579af42ab9a28022444cae7fa605af4df612d54"}, + {file = "coverage-6.4.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:145f296d00441ca703a659e8f3eb48ae39fb083baba2d7ce4482fb2723e050d9"}, + {file = "coverage-6.4.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d67d44996140af8b84284e5e7d398e589574b376fb4de8ccd28d82ad8e3bea13"}, + {file = "coverage-6.4.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2bd9a6fc18aab8d2e18f89b7ff91c0f34ff4d5e0ba0b33e989b3cd4194c81fd9"}, + {file = "coverage-6.4.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3384f2a3652cef289e38100f2d037956194a837221edd520a7ee5b42d00cc605"}, + {file = "coverage-6.4.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:9b3e07152b4563722be523e8cd0b209e0d1a373022cfbde395ebb6575bf6790d"}, + {file = "coverage-6.4.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:1480ff858b4113db2718848d7b2d1b75bc79895a9c22e76a221b9d8d62496428"}, + {file = "coverage-6.4.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:865d69ae811a392f4d06bde506d531f6a28a00af36f5c8649684a9e5e4a85c83"}, + {file = "coverage-6.4.1-cp38-cp38-win32.whl", hash = "sha256:664a47ce62fe4bef9e2d2c430306e1428ecea207ffd68649e3b942fa8ea83b0b"}, + {file = "coverage-6.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:26dff09fb0d82693ba9e6231248641d60ba606150d02ed45110f9ec26404ed1c"}, + {file = "coverage-6.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d9c80df769f5ec05ad21ea34be7458d1dc51ff1fb4b2219e77fe24edf462d6df"}, + {file = "coverage-6.4.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:39ee53946bf009788108b4dd2894bf1349b4e0ca18c2016ffa7d26ce46b8f10d"}, + {file = "coverage-6.4.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f5b66caa62922531059bc5ac04f836860412f7f88d38a476eda0a6f11d4724f4"}, + {file = "coverage-6.4.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fd180ed867e289964404051a958f7cccabdeed423f91a899829264bb7974d3d3"}, + {file = "coverage-6.4.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:84631e81dd053e8a0d4967cedab6db94345f1c36107c71698f746cb2636c63e3"}, + {file = "coverage-6.4.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:8c08da0bd238f2970230c2a0d28ff0e99961598cb2e810245d7fc5afcf1254e8"}, + {file = "coverage-6.4.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:d42c549a8f41dc103a8004b9f0c433e2086add8a719da00e246e17cbe4056f72"}, + {file = "coverage-6.4.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:309ce4a522ed5fca432af4ebe0f32b21d6d7ccbb0f5fcc99290e71feba67c264"}, + {file = "coverage-6.4.1-cp39-cp39-win32.whl", hash = "sha256:fdb6f7bd51c2d1714cea40718f6149ad9be6a2ee7d93b19e9f00934c0f2a74d9"}, + {file = "coverage-6.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:342d4aefd1c3e7f620a13f4fe563154d808b69cccef415415aece4c786665397"}, + {file = "coverage-6.4.1-pp36.pp37.pp38-none-any.whl", hash = "sha256:4803e7ccf93230accb928f3a68f00ffa80a88213af98ed338a57ad021ef06815"}, + {file = "coverage-6.4.1.tar.gz", hash = "sha256:4321f075095a096e70aff1d002030ee612b65a205a0a0f5b815280d5dc58100c"}, ] deprecated = [ {file = "Deprecated-1.2.13-py2.py3-none-any.whl", hash = "sha256:64756e3e14c8c5eea9795d93c524551432a0be75629f8f29e67ab8caf076c76d"}, @@ -1638,10 +1404,6 @@ docutils = [ {file = "docutils-0.17.1-py2.py3-none-any.whl", hash = "sha256:cf316c8370a737a022b72b56874f6602acf974a37a9fba42ec2876387549fc61"}, {file = "docutils-0.17.1.tar.gz", hash = "sha256:686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125"}, ] -executing = [ - {file = "executing-0.8.3-py2.py3-none-any.whl", hash = "sha256:d1eef132db1b83649a3905ca6dd8897f71ac6f8cac79a7e58a1a09cf137546c9"}, - {file = "executing-0.8.3.tar.gz", hash = "sha256:c6554e21c6b060590a6d3be4b82fb78f8f0194d809de5ea7df1c093763311501"}, -] filelock = [ {file = "filelock-3.6.0-py3-none-any.whl", hash = "sha256:f8314284bfffbdcfa0ff3d7992b023d4c628ced6feb957351d4c48d059f56bc0"}, {file = "filelock-3.6.0.tar.gz", hash = "sha256:9cd540a9352e432c7246a48fe4e8712b10acb1df2ad1f30e8c070b82ae1fed85"}, @@ -1712,8 +1474,8 @@ frozenlist = [ {file = "frozenlist-1.3.0.tar.gz", hash = "sha256:ce6f2ba0edb7b0c1d8976565298ad2deba6f8064d2bebb6ffce2ca896eb35b0b"}, ] furo = [ - {file = "furo-2022.4.7-py3-none-any.whl", hash = "sha256:7f3e3d2fb977483590f8ecb2c2cd511bd82661b79c18efb24de9558bc9cdf2d7"}, - {file = "furo-2022.4.7.tar.gz", hash = "sha256:96204ab7cd047e4b6c523996e0279c4c629a8fc31f4f109b2efd470c17f49c80"}, + {file = "furo-2022.6.21-py3-none-any.whl", hash = "sha256:061b68e323345e27fcba024cf33a1e77f3dfd8d9987410be822749a706e2add6"}, + {file = "furo-2022.6.21.tar.gz", hash = "sha256:9aa983b7488a4601d13113884bfb7254502c8729942e073a0acb87a5512af223"}, ] identify = [ {file = "identify-2.4.12-py2.py3-none-any.whl", hash = "sha256:5f06b14366bd1facb88b00540a1de05b69b310cbc2654db3c7e07fa3a4339323"}, @@ -1739,18 +1501,10 @@ iniconfig = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, ] -ipython = [ - {file = "ipython-8.2.0-py3-none-any.whl", hash = "sha256:1b672bfd7a48d87ab203d9af8727a3b0174a4566b4091e9447c22fb63ea32857"}, - {file = "ipython-8.2.0.tar.gz", hash = "sha256:70e5eb132cac594a34b5f799bd252589009905f05104728aea6a403ec2519dc1"}, -] isort = [ {file = "isort-5.10.1-py3-none-any.whl", hash = "sha256:6f62d78e2f89b4500b080fe3a81690850cd254227f27f75c3a0c491a1f351ba7"}, {file = "isort-5.10.1.tar.gz", hash = "sha256:e8443a5e7a020e9d7f97f1d7d9cd17c88bcb3bc7e218bf9cf5095fe550be2951"}, ] -jedi = [ - {file = "jedi-0.18.1-py2.py3-none-any.whl", hash = "sha256:637c9635fcf47945ceb91cd7f320234a7be540ded6f3e99a50cb6febdfd1ba8d"}, - {file = "jedi-0.18.1.tar.gz", hash = "sha256:74137626a64a99c8eb6ae5832d99b3bdd7d29a3850fe2aa80a4126b2a7d949ab"}, -] jinja2 = [ {file = "Jinja2-3.1.1-py3-none-any.whl", hash = "sha256:539835f51a74a69f41b848a9645dbdc35b4f20a3b601e2d9a7e22947b15ff119"}, {file = "Jinja2-3.1.1.tar.gz", hash = "sha256:640bed4bb501cbd17194b3cace1dc2126f5b619cf068a726b98192a0fde74ae9"}, @@ -1811,10 +1565,6 @@ markupsafe = [ {file = "MarkupSafe-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247"}, {file = "MarkupSafe-2.1.1.tar.gz", hash = "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"}, ] -matplotlib-inline = [ - {file = "matplotlib-inline-0.1.3.tar.gz", hash = "sha256:a04bfba22e0d1395479f866853ec1ee28eea1485c1d69a6faf00dc3e24ff34ee"}, - {file = "matplotlib_inline-0.1.3-py3-none-any.whl", hash = "sha256:aed605ba3b72462d64d475a21a9296f400a19c4f74a31b59103d2a99ffd5aa5c"}, -] mccabe = [ {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, @@ -1881,29 +1631,29 @@ multidict = [ {file = "multidict-6.0.2.tar.gz", hash = "sha256:5ff3bd75f38e4c43f1f470f2df7a4d430b821c4ce22be384e1459cb57d6bb013"}, ] mypy = [ - {file = "mypy-0.942-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:5bf44840fb43ac4074636fd47ee476d73f0039f4f54e86d7265077dc199be24d"}, - {file = "mypy-0.942-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:dcd955f36e0180258a96f880348fbca54ce092b40fbb4b37372ae3b25a0b0a46"}, - {file = "mypy-0.942-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6776e5fa22381cc761df53e7496a805801c1a751b27b99a9ff2f0ca848c7eca0"}, - {file = "mypy-0.942-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:edf7237137a1a9330046dbb14796963d734dd740a98d5e144a3eb1d267f5f9ee"}, - {file = "mypy-0.942-cp310-cp310-win_amd64.whl", hash = "sha256:64235137edc16bee6f095aba73be5334677d6f6bdb7fa03cfab90164fa294a17"}, - {file = "mypy-0.942-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:b840cfe89c4ab6386c40300689cd8645fc8d2d5f20101c7f8bd23d15fca14904"}, - {file = "mypy-0.942-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:2b184db8c618c43c3a31b32ff00cd28195d39e9c24e7c3b401f3db7f6e5767f5"}, - {file = "mypy-0.942-cp36-cp36m-win_amd64.whl", hash = "sha256:1a0459c333f00e6a11cbf6b468b870c2b99a906cb72d6eadf3d1d95d38c9352c"}, - {file = "mypy-0.942-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:4c3e497588afccfa4334a9986b56f703e75793133c4be3a02d06a3df16b67a58"}, - {file = "mypy-0.942-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:6f6ad963172152e112b87cc7ec103ba0f2db2f1cd8997237827c052a3903eaa6"}, - {file = "mypy-0.942-cp37-cp37m-win_amd64.whl", hash = "sha256:0e2dd88410937423fba18e57147dd07cd8381291b93d5b1984626f173a26543e"}, - {file = "mypy-0.942-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:246e1aa127d5b78488a4a0594bd95f6d6fb9d63cf08a66dafbff8595d8891f67"}, - {file = "mypy-0.942-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d8d3ba77e56b84cd47a8ee45b62c84b6d80d32383928fe2548c9a124ea0a725c"}, - {file = "mypy-0.942-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:2bc249409a7168d37c658e062e1ab5173300984a2dada2589638568ddc1db02b"}, - {file = "mypy-0.942-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:9521c1265ccaaa1791d2c13582f06facf815f426cd8b07c3a485f486a8ffc1f3"}, - {file = "mypy-0.942-cp38-cp38-win_amd64.whl", hash = "sha256:e865fec858d75b78b4d63266c9aff770ecb6a39dfb6d6b56c47f7f8aba6baba8"}, - {file = "mypy-0.942-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:6ce34a118d1a898f47def970a2042b8af6bdcc01546454726c7dd2171aa6dfca"}, - {file = "mypy-0.942-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:10daab80bc40f84e3f087d896cdb53dc811a9f04eae4b3f95779c26edee89d16"}, - {file = "mypy-0.942-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3841b5433ff936bff2f4dc8d54cf2cdbfea5d8e88cedfac45c161368e5770ba6"}, - {file = "mypy-0.942-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:6f7106cbf9cc2f403693bf50ed7c9fa5bb3dfa9007b240db3c910929abe2a322"}, - {file = "mypy-0.942-cp39-cp39-win_amd64.whl", hash = "sha256:7742d2c4e46bb5017b51c810283a6a389296cda03df805a4f7869a6f41246534"}, - {file = "mypy-0.942-py3-none-any.whl", hash = "sha256:a1b383fe99678d7402754fe90448d4037f9512ce70c21f8aee3b8bf48ffc51db"}, - {file = "mypy-0.942.tar.gz", hash = "sha256:17e44649fec92e9f82102b48a3bf7b4a5510ad0cd22fa21a104826b5db4903e2"}, + {file = "mypy-0.961-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:697540876638ce349b01b6786bc6094ccdaba88af446a9abb967293ce6eaa2b0"}, + {file = "mypy-0.961-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b117650592e1782819829605a193360a08aa99f1fc23d1d71e1a75a142dc7e15"}, + {file = "mypy-0.961-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:bdd5ca340beffb8c44cb9dc26697628d1b88c6bddf5c2f6eb308c46f269bb6f3"}, + {file = "mypy-0.961-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3e09f1f983a71d0672bbc97ae33ee3709d10c779beb613febc36805a6e28bb4e"}, + {file = "mypy-0.961-cp310-cp310-win_amd64.whl", hash = "sha256:e999229b9f3198c0c880d5e269f9f8129c8862451ce53a011326cad38b9ccd24"}, + {file = "mypy-0.961-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:b24be97351084b11582fef18d79004b3e4db572219deee0212078f7cf6352723"}, + {file = "mypy-0.961-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f4a21d01fc0ba4e31d82f0fff195682e29f9401a8bdb7173891070eb260aeb3b"}, + {file = "mypy-0.961-cp36-cp36m-win_amd64.whl", hash = "sha256:439c726a3b3da7ca84a0199a8ab444cd8896d95012c4a6c4a0d808e3147abf5d"}, + {file = "mypy-0.961-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5a0b53747f713f490affdceef835d8f0cb7285187a6a44c33821b6d1f46ed813"}, + {file = "mypy-0.961-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:0e9f70df36405c25cc530a86eeda1e0867863d9471fe76d1273c783df3d35c2e"}, + {file = "mypy-0.961-cp37-cp37m-win_amd64.whl", hash = "sha256:b88f784e9e35dcaa075519096dc947a388319cb86811b6af621e3523980f1c8a"}, + {file = "mypy-0.961-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:d5aaf1edaa7692490f72bdb9fbd941fbf2e201713523bdb3f4038be0af8846c6"}, + {file = "mypy-0.961-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:9f5f5a74085d9a81a1f9c78081d60a0040c3efb3f28e5c9912b900adf59a16e6"}, + {file = "mypy-0.961-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:f4b794db44168a4fc886e3450201365c9526a522c46ba089b55e1f11c163750d"}, + {file = "mypy-0.961-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:64759a273d590040a592e0f4186539858c948302c653c2eac840c7a3cd29e51b"}, + {file = "mypy-0.961-cp38-cp38-win_amd64.whl", hash = "sha256:63e85a03770ebf403291ec50097954cc5caf2a9205c888ce3a61bd3f82e17569"}, + {file = "mypy-0.961-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:5f1332964963d4832a94bebc10f13d3279be3ce8f6c64da563d6ee6e2eeda932"}, + {file = "mypy-0.961-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:006be38474216b833eca29ff6b73e143386f352e10e9c2fbe76aa8549e5554f5"}, + {file = "mypy-0.961-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:9940e6916ed9371809b35b2154baf1f684acba935cd09928952310fbddaba648"}, + {file = "mypy-0.961-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:a5ea0875a049de1b63b972456542f04643daf320d27dc592d7c3d9cd5d9bf950"}, + {file = "mypy-0.961-cp39-cp39-win_amd64.whl", hash = "sha256:1ece702f29270ec6af25db8cf6185c04c02311c6bb21a69f423d40e527b75c56"}, + {file = "mypy-0.961-py3-none-any.whl", hash = "sha256:03c6cc893e7563e7b2949b969e63f02c000b32502a1b4d1314cabe391aa87d66"}, + {file = "mypy-0.961.tar.gz", hash = "sha256:f730d56cb924d371c26b8eaddeea3cc07d78ff51c521c6d04899ac6904b75492"}, ] mypy-extensions = [ {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, @@ -1917,22 +1667,10 @@ packaging = [ {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"}, {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"}, ] -parso = [ - {file = "parso-0.8.3-py2.py3-none-any.whl", hash = "sha256:c001d4636cd3aecdaf33cbb40aebb59b094be2a74c556778ef5576c175e19e75"}, - {file = "parso-0.8.3.tar.gz", hash = "sha256:8c07be290bb59f03588915921e29e8a50002acaf2cdc5fa0e0114f91709fafa0"}, -] pathspec = [ {file = "pathspec-0.9.0-py2.py3-none-any.whl", hash = "sha256:7d15c4ddb0b5c802d161efc417ec1a2558ea2653c2e8ad9c19098201dc1c993a"}, {file = "pathspec-0.9.0.tar.gz", hash = "sha256:e564499435a2673d586f6b2130bb5b95f04a3ba06f81b8f895b651a3c76aabb1"}, ] -pexpect = [ - {file = "pexpect-4.8.0-py2.py3-none-any.whl", hash = "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937"}, - {file = "pexpect-4.8.0.tar.gz", hash = "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c"}, -] -pickleshare = [ - {file = "pickleshare-0.7.5-py2.py3-none-any.whl", hash = "sha256:9649af414d74d4df115d5d718f82acb59c9d418196b7b4290ed47a12ce62df56"}, - {file = "pickleshare-0.7.5.tar.gz", hash = "sha256:87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca"}, -] platformdirs = [ {file = "platformdirs-2.5.1-py3-none-any.whl", hash = "sha256:bcae7cab893c2d310a711b70b24efb93334febe65f8de776ee320b517471e227"}, {file = "platformdirs-2.5.1.tar.gz", hash = "sha256:7535e70dfa32e84d4b34996ea99c5e432fa29a708d0f4e394bbcb2a8faa4f16d"}, @@ -1942,20 +1680,8 @@ pluggy = [ {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, ] pre-commit = [ - {file = "pre_commit-2.18.1-py2.py3-none-any.whl", hash = "sha256:02226e69564ebca1a070bd1f046af866aa1c318dbc430027c50ab832ed2b73f2"}, - {file = "pre_commit-2.18.1.tar.gz", hash = "sha256:5d445ee1fa8738d506881c5d84f83c62bb5be6b2838e32207433647e8e5ebe10"}, -] -prompt-toolkit = [ - {file = "prompt_toolkit-3.0.29-py3-none-any.whl", hash = "sha256:62291dad495e665fca0bda814e342c69952086afb0f4094d0893d357e5c78752"}, - {file = "prompt_toolkit-3.0.29.tar.gz", hash = "sha256:bd640f60e8cecd74f0dc249713d433ace2ddc62b65ee07f96d358e0b152b6ea7"}, -] -ptyprocess = [ - {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, - {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, -] -pure-eval = [ - {file = "pure_eval-0.2.2-py3-none-any.whl", hash = "sha256:01eaab343580944bc56080ebe0a674b39ec44a945e6d09ba7db3cb8cec289350"}, - {file = "pure_eval-0.2.2.tar.gz", hash = "sha256:2b45320af6dfaa1750f543d714b6d1c520a1688dec6fd24d339063ce0aaa9ac3"}, + {file = "pre_commit-2.19.0-py2.py3-none-any.whl", hash = "sha256:10c62741aa5704faea2ad69cb550ca78082efe5697d6f04e5710c3c229afdd10"}, + {file = "pre_commit-2.19.0.tar.gz", hash = "sha256:4233a1e38621c87d9dda9808c6606d7e7ba0e087cd56d3fe03202a01d2919615"}, ] py = [ {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, @@ -1966,53 +1692,53 @@ pycodestyle = [ {file = "pycodestyle-2.8.0.tar.gz", hash = "sha256:eddd5847ef438ea1c7870ca7eb78a9d47ce0cdb4851a5523949f2601d0cbbe7f"}, ] pydantic = [ - {file = "pydantic-1.9.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:cb23bcc093697cdea2708baae4f9ba0e972960a835af22560f6ae4e7e47d33f5"}, - {file = "pydantic-1.9.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1d5278bd9f0eee04a44c712982343103bba63507480bfd2fc2790fa70cd64cf4"}, - {file = "pydantic-1.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ab624700dc145aa809e6f3ec93fb8e7d0f99d9023b713f6a953637429b437d37"}, - {file = "pydantic-1.9.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c8d7da6f1c1049eefb718d43d99ad73100c958a5367d30b9321b092771e96c25"}, - {file = "pydantic-1.9.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:3c3b035103bd4e2e4a28da9da7ef2fa47b00ee4a9cf4f1a735214c1bcd05e0f6"}, - {file = "pydantic-1.9.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:3011b975c973819883842c5ab925a4e4298dffccf7782c55ec3580ed17dc464c"}, - {file = "pydantic-1.9.0-cp310-cp310-win_amd64.whl", hash = "sha256:086254884d10d3ba16da0588604ffdc5aab3f7f09557b998373e885c690dd398"}, - {file = "pydantic-1.9.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:0fe476769acaa7fcddd17cadd172b156b53546ec3614a4d880e5d29ea5fbce65"}, - {file = "pydantic-1.9.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c8e9dcf1ac499679aceedac7e7ca6d8641f0193c591a2d090282aaf8e9445a46"}, - {file = "pydantic-1.9.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d1e4c28f30e767fd07f2ddc6f74f41f034d1dd6bc526cd59e63a82fe8bb9ef4c"}, - {file = "pydantic-1.9.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:c86229333cabaaa8c51cf971496f10318c4734cf7b641f08af0a6fbf17ca3054"}, - {file = "pydantic-1.9.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:c0727bda6e38144d464daec31dff936a82917f431d9c39c39c60a26567eae3ed"}, - {file = "pydantic-1.9.0-cp36-cp36m-win_amd64.whl", hash = "sha256:dee5ef83a76ac31ab0c78c10bd7d5437bfdb6358c95b91f1ba7ff7b76f9996a1"}, - {file = "pydantic-1.9.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:d9c9bdb3af48e242838f9f6e6127de9be7063aad17b32215ccc36a09c5cf1070"}, - {file = "pydantic-1.9.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ee7e3209db1e468341ef41fe263eb655f67f5c5a76c924044314e139a1103a2"}, - {file = "pydantic-1.9.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0b6037175234850ffd094ca77bf60fb54b08b5b22bc85865331dd3bda7a02fa1"}, - {file = "pydantic-1.9.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:b2571db88c636d862b35090ccf92bf24004393f85c8870a37f42d9f23d13e032"}, - {file = "pydantic-1.9.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8b5ac0f1c83d31b324e57a273da59197c83d1bb18171e512908fe5dc7278a1d6"}, - {file = "pydantic-1.9.0-cp37-cp37m-win_amd64.whl", hash = "sha256:bbbc94d0c94dd80b3340fc4f04fd4d701f4b038ebad72c39693c794fd3bc2d9d"}, - {file = "pydantic-1.9.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:e0896200b6a40197405af18828da49f067c2fa1f821491bc8f5bde241ef3f7d7"}, - {file = "pydantic-1.9.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7bdfdadb5994b44bd5579cfa7c9b0e1b0e540c952d56f627eb227851cda9db77"}, - {file = "pydantic-1.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:574936363cd4b9eed8acdd6b80d0143162f2eb654d96cb3a8ee91d3e64bf4cf9"}, - {file = "pydantic-1.9.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c556695b699f648c58373b542534308922c46a1cda06ea47bc9ca45ef5b39ae6"}, - {file = "pydantic-1.9.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:f947352c3434e8b937e3aa8f96f47bdfe6d92779e44bb3f41e4c213ba6a32145"}, - {file = "pydantic-1.9.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5e48ef4a8b8c066c4a31409d91d7ca372a774d0212da2787c0d32f8045b1e034"}, - {file = "pydantic-1.9.0-cp38-cp38-win_amd64.whl", hash = "sha256:96f240bce182ca7fe045c76bcebfa0b0534a1bf402ed05914a6f1dadff91877f"}, - {file = "pydantic-1.9.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:815ddebb2792efd4bba5488bc8fde09c29e8ca3227d27cf1c6990fc830fd292b"}, - {file = "pydantic-1.9.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6c5b77947b9e85a54848343928b597b4f74fc364b70926b3c4441ff52620640c"}, - {file = "pydantic-1.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c68c3bc88dbda2a6805e9a142ce84782d3930f8fdd9655430d8576315ad97ce"}, - {file = "pydantic-1.9.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5a79330f8571faf71bf93667d3ee054609816f10a259a109a0738dac983b23c3"}, - {file = "pydantic-1.9.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:f5a64b64ddf4c99fe201ac2724daada8595ada0d102ab96d019c1555c2d6441d"}, - {file = "pydantic-1.9.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a733965f1a2b4090a5238d40d983dcd78f3ecea221c7af1497b845a9709c1721"}, - {file = "pydantic-1.9.0-cp39-cp39-win_amd64.whl", hash = "sha256:2cc6a4cb8a118ffec2ca5fcb47afbacb4f16d0ab8b7350ddea5e8ef7bcc53a16"}, - {file = "pydantic-1.9.0-py3-none-any.whl", hash = "sha256:085ca1de245782e9b46cefcf99deecc67d418737a1fd3f6a4f511344b613a5b3"}, - {file = "pydantic-1.9.0.tar.gz", hash = "sha256:742645059757a56ecd886faf4ed2441b9c0cd406079c2b4bee51bcc3fbcd510a"}, + {file = "pydantic-1.9.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c8098a724c2784bf03e8070993f6d46aa2eeca031f8d8a048dff277703e6e193"}, + {file = "pydantic-1.9.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c320c64dd876e45254bdd350f0179da737463eea41c43bacbee9d8c9d1021f11"}, + {file = "pydantic-1.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:18f3e912f9ad1bdec27fb06b8198a2ccc32f201e24174cec1b3424dda605a310"}, + {file = "pydantic-1.9.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c11951b404e08b01b151222a1cb1a9f0a860a8153ce8334149ab9199cd198131"}, + {file = "pydantic-1.9.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:8bc541a405423ce0e51c19f637050acdbdf8feca34150e0d17f675e72d119580"}, + {file = "pydantic-1.9.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:e565a785233c2d03724c4dc55464559639b1ba9ecf091288dd47ad9c629433bd"}, + {file = "pydantic-1.9.1-cp310-cp310-win_amd64.whl", hash = "sha256:a4a88dcd6ff8fd47c18b3a3709a89adb39a6373f4482e04c1b765045c7e282fd"}, + {file = "pydantic-1.9.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:447d5521575f18e18240906beadc58551e97ec98142266e521c34968c76c8761"}, + {file = "pydantic-1.9.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:985ceb5d0a86fcaa61e45781e567a59baa0da292d5ed2e490d612d0de5796918"}, + {file = "pydantic-1.9.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:059b6c1795170809103a1538255883e1983e5b831faea6558ef873d4955b4a74"}, + {file = "pydantic-1.9.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:d12f96b5b64bec3f43c8e82b4aab7599d0157f11c798c9f9c528a72b9e0b339a"}, + {file = "pydantic-1.9.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:ae72f8098acb368d877b210ebe02ba12585e77bd0db78ac04a1ee9b9f5dd2166"}, + {file = "pydantic-1.9.1-cp36-cp36m-win_amd64.whl", hash = "sha256:79b485767c13788ee314669008d01f9ef3bc05db9ea3298f6a50d3ef596a154b"}, + {file = "pydantic-1.9.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:494f7c8537f0c02b740c229af4cb47c0d39840b829ecdcfc93d91dcbb0779892"}, + {file = "pydantic-1.9.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f0f047e11febe5c3198ed346b507e1d010330d56ad615a7e0a89fae604065a0e"}, + {file = "pydantic-1.9.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:969dd06110cb780da01336b281f53e2e7eb3a482831df441fb65dd30403f4608"}, + {file = "pydantic-1.9.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:177071dfc0df6248fd22b43036f936cfe2508077a72af0933d0c1fa269b18537"}, + {file = "pydantic-1.9.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:9bcf8b6e011be08fb729d110f3e22e654a50f8a826b0575c7196616780683380"}, + {file = "pydantic-1.9.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a955260d47f03df08acf45689bd163ed9df82c0e0124beb4251b1290fa7ae728"}, + {file = "pydantic-1.9.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:9ce157d979f742a915b75f792dbd6aa63b8eccaf46a1005ba03aa8a986bde34a"}, + {file = "pydantic-1.9.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:0bf07cab5b279859c253d26a9194a8906e6f4a210063b84b433cf90a569de0c1"}, + {file = "pydantic-1.9.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d93d4e95eacd313d2c765ebe40d49ca9dd2ed90e5b37d0d421c597af830c195"}, + {file = "pydantic-1.9.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1542636a39c4892c4f4fa6270696902acb186a9aaeac6f6cf92ce6ae2e88564b"}, + {file = "pydantic-1.9.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a9af62e9b5b9bc67b2a195ebc2c2662fdf498a822d62f902bf27cccb52dbbf49"}, + {file = "pydantic-1.9.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:fe4670cb32ea98ffbf5a1262f14c3e102cccd92b1869df3bb09538158ba90fe6"}, + {file = "pydantic-1.9.1-cp38-cp38-win_amd64.whl", hash = "sha256:9f659a5ee95c8baa2436d392267988fd0f43eb774e5eb8739252e5a7e9cf07e0"}, + {file = "pydantic-1.9.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b83ba3825bc91dfa989d4eed76865e71aea3a6ca1388b59fc801ee04c4d8d0d6"}, + {file = "pydantic-1.9.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1dd8fecbad028cd89d04a46688d2fcc14423e8a196d5b0a5c65105664901f810"}, + {file = "pydantic-1.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:02eefd7087268b711a3ff4db528e9916ac9aa18616da7bca69c1871d0b7a091f"}, + {file = "pydantic-1.9.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7eb57ba90929bac0b6cc2af2373893d80ac559adda6933e562dcfb375029acee"}, + {file = "pydantic-1.9.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:4ce9ae9e91f46c344bec3b03d6ee9612802682c1551aaf627ad24045ce090761"}, + {file = "pydantic-1.9.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:72ccb318bf0c9ab97fc04c10c37683d9eea952ed526707fabf9ac5ae59b701fd"}, + {file = "pydantic-1.9.1-cp39-cp39-win_amd64.whl", hash = "sha256:61b6760b08b7c395975d893e0b814a11cf011ebb24f7d869e7118f5a339a82e1"}, + {file = "pydantic-1.9.1-py3-none-any.whl", hash = "sha256:4988c0f13c42bfa9ddd2fe2f569c9d54646ce84adc5de84228cfe83396f3bd58"}, + {file = "pydantic-1.9.1.tar.gz", hash = "sha256:1ed987c3ff29fff7fd8c3ea3a3ea877ad310aae2ef9889a119e22d3f2db0691a"}, ] pyflakes = [ {file = "pyflakes-2.4.0-py2.py3-none-any.whl", hash = "sha256:3bb3a3f256f4b7968c9c788781e4ff07dce46bdf12339dcda61053375426ee2e"}, {file = "pyflakes-2.4.0.tar.gz", hash = "sha256:05a85c2872edf37a4ed30b0cce2f6093e1d0581f8c19d7393122da7e25b2b24c"}, ] pygments = [ - {file = "Pygments-2.11.2-py3-none-any.whl", hash = "sha256:44238f1b60a76d78fc8ca0528ee429702aae011c265fe6a8dd8b63049ae41c65"}, - {file = "Pygments-2.11.2.tar.gz", hash = "sha256:4e426f72023d88d03b2fa258de560726ce890ff3b630f88c21cbb8b2503b8c6a"}, + {file = "Pygments-2.12.0-py3-none-any.whl", hash = "sha256:dc9c10fb40944260f6ed4c688ece0cd2048414940f1cea51b8b226318411c519"}, + {file = "Pygments-2.12.0.tar.gz", hash = "sha256:5eb116118f9612ff1ee89ac96437bb6b49e8f04d8a13b514ba26f620208e26eb"}, ] pymdown-extensions = [ - {file = "pymdown-extensions-9.3.tar.gz", hash = "sha256:a80553b243d3ed2d6c27723bcd64ca9887e560e6f4808baa96f36e93061eaf90"}, - {file = "pymdown_extensions-9.3-py3-none-any.whl", hash = "sha256:b37461a181c1c8103cfe1660081726a0361a8294cbfda88e5b02cefe976f0546"}, + {file = "pymdown_extensions-9.5-py3-none-any.whl", hash = "sha256:ec141c0f4983755349f0c8710416348d1a13753976c028186ed14f190c8061c4"}, + {file = "pymdown_extensions-9.5.tar.gz", hash = "sha256:3ef2d998c0d5fa7eb09291926d90d69391283561cf6306f85cd588a5eb5befa0"}, ] pyparsing = [ {file = "pyparsing-3.0.8-py3-none-any.whl", hash = "sha256:ef7b523f6356f763771559412c0d7134753f037822dad1b16945b7b846f7ad06"}, @@ -2048,8 +1774,8 @@ pytest-metadata = [ {file = "pytest_metadata-2.0.0-py3-none-any.whl", hash = "sha256:e25f1a77ed02baf1d83911604247a70d60d7dcb970aa12be38e1ed58d4d38e65"}, ] pytest-mock = [ - {file = "pytest-mock-3.7.0.tar.gz", hash = "sha256:5112bd92cc9f186ee96e1a92efc84969ea494939c3aead39c50f421c4cc69534"}, - {file = "pytest_mock-3.7.0-py3-none-any.whl", hash = "sha256:6cff27cec936bf81dc5ee87f07132b807bcda51106b5ec4b90a04331cba76231"}, + {file = "pytest-mock-3.8.1.tar.gz", hash = "sha256:2c6d756d5d3bf98e2e80797a959ca7f81f479e7d1f5f571611b0fdd6d1745240"}, + {file = "pytest_mock-3.8.1-py3-none-any.whl", hash = "sha256:d989f11ca4a84479e288b0cd1e6769d6ad0d3d7743dcc75e460d1416a5f2135a"}, ] pytest-mypy = [ {file = "pytest-mypy-0.9.1.tar.gz", hash = "sha256:9ffa3bf405c12c5c6be9e92e22bebb6ab2c91b9c32f45b0f0c93af473269ab5c"}, @@ -2099,17 +1825,13 @@ pyyaml = [ {file = "PyYAML-6.0.tar.gz", hash = "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"}, ] redis = [ - {file = "redis-4.2.2-py3-none-any.whl", hash = "sha256:4e95f4ec5f49e636efcf20061a5a9110c20852f607cfca6865c07aaa8a739ee2"}, - {file = "redis-4.2.2.tar.gz", hash = "sha256:0107dc8e98a4f1d1d4aa00100e044287f77121a1e6d2085545c4b7fa94a7a27f"}, + {file = "redis-4.3.3-py3-none-any.whl", hash = "sha256:f57f8df5d238a8ecf92f499b6b21467bfee6c13d89953c27edf1e2bc673622e7"}, + {file = "redis-4.3.3.tar.gz", hash = "sha256:2f7a57cf4af15cd543c4394bcbe2b9148db2606a37edba755368836e3a1d053e"}, ] requests = [ {file = "requests-2.27.1-py2.py3-none-any.whl", hash = "sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d"}, {file = "requests-2.27.1.tar.gz", hash = "sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61"}, ] -sentry-sdk = [ - {file = "sentry-sdk-1.5.8.tar.gz", hash = "sha256:38fd16a92b5ef94203db3ece10e03bdaa291481dd7e00e77a148aa0302267d47"}, - {file = "sentry_sdk-1.5.8-py2.py3-none-any.whl", hash = "sha256:32af1a57954576709242beb8c373b3dbde346ac6bd616921def29d68846fb8c3"}, -] six = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, @@ -2130,6 +1852,10 @@ sphinx-autobuild = [ {file = "sphinx-autobuild-2021.3.14.tar.gz", hash = "sha256:de1ca3b66e271d2b5b5140c35034c89e47f263f2cd5db302c9217065f7443f05"}, {file = "sphinx_autobuild-2021.3.14-py3-none-any.whl", hash = "sha256:8fe8cbfdb75db04475232f05187c776f46f6e9e04cacf1e49ce81bdac649ccac"}, ] +sphinx-basic-ng = [ + {file = "sphinx_basic_ng-0.0.1a11-py3-none-any.whl", hash = "sha256:9aecb5345816998789ef76658a83e3c0a12aafa14b17d40e28cd4aaeb94d1517"}, + {file = "sphinx_basic_ng-0.0.1a11.tar.gz", hash = "sha256:bf9a8fda0379c7d2ab51c9543f2b18e014b77fb295b49d64f3c1a910c863b34f"}, +] sphinx-copybutton = [ {file = "sphinx-copybutton-0.5.0.tar.gz", hash = "sha256:a0c059daadd03c27ba750da534a92a63e7a36a7736dcf684f26ee346199787f6"}, {file = "sphinx_copybutton-0.5.0-py3-none-any.whl", hash = "sha256:9684dec7434bd73f0eea58dda93f9bb879d24bff2d8b187b1f2ec08dfe7b5f48"}, @@ -2169,10 +1895,6 @@ sphinxcontrib-serializinghtml = [ {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, ] -stack-data = [ - {file = "stack_data-0.2.0-py3-none-any.whl", hash = "sha256:999762f9c3132308789affa03e9271bbbe947bf78311851f4d485d8402ed858e"}, - {file = "stack_data-0.2.0.tar.gz", hash = "sha256:45692d41bd633a9503a5195552df22b583caf16f0b27c4e58c98d88c8b648e12"}, -] toml = [ {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, @@ -2228,13 +1950,9 @@ towncrier = [ {file = "towncrier-21.9.0-py2.py3-none-any.whl", hash = "sha256:fc5a88a2a54988e3a8ed2b60d553599da8330f65722cc607c839614ed87e0f92"}, {file = "towncrier-21.9.0.tar.gz", hash = "sha256:9cb6f45c16e1a1eec9d0e7651165e7be60cd0ab81d13a5c96ca97a498ae87f48"}, ] -traitlets = [ - {file = "traitlets-5.1.1-py3-none-any.whl", hash = "sha256:2d313cc50a42cd6c277e7d7dc8d4d7fedd06a2c215f78766ae7b1a66277e0033"}, - {file = "traitlets-5.1.1.tar.gz", hash = "sha256:059f456c5a7c1c82b98c2e8c799f39c9b8128f6d0d46941ee118daace9eb70c7"}, -] typing-extensions = [ - {file = "typing_extensions-4.1.1-py3-none-any.whl", hash = "sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2"}, - {file = "typing_extensions-4.1.1.tar.gz", hash = "sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42"}, + {file = "typing_extensions-4.2.0-py3-none-any.whl", hash = "sha256:6657594ee297170d19f67d55c05852a874e7eb634f4f753dbd667855e07c1708"}, + {file = "typing_extensions-4.2.0.tar.gz", hash = "sha256:f1c24655a0da0d1b67f07e17a5e6b2a105894e6824b92096378bb3668ef02376"}, ] urllib3 = [ {file = "urllib3-1.26.9-py2.py3-none-any.whl", hash = "sha256:44ece4d53fb1706f667c9bd1c648f5469a2ec925fcf3a776667042d645472c14"}, @@ -2262,10 +1980,6 @@ virtualenv = [ {file = "virtualenv-20.14.0-py2.py3-none-any.whl", hash = "sha256:1e8588f35e8b42c6ec6841a13c5e88239de1e6e4e4cedfd3916b306dc826ec66"}, {file = "virtualenv-20.14.0.tar.gz", hash = "sha256:8e5b402037287126e81ccde9432b95a8be5b19d36584f64957060a3488c11ca8"}, ] -wcwidth = [ - {file = "wcwidth-0.2.5-py2.py3-none-any.whl", hash = "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784"}, - {file = "wcwidth-0.2.5.tar.gz", hash = "sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83"}, -] wrapt = [ {file = "wrapt-1.14.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:5a9a1889cc01ed2ed5f34574c90745fab1dd06ec2eee663e8ebeefe363e8efd7"}, {file = "wrapt-1.14.0-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:9a3ff5fb015f6feb78340143584d9f8a0b91b6293d6b5cf4295b3e95d179b88c"}, diff --git a/pyproject.toml b/pyproject.toml index 14cdfc3b..ba5f8449 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "aiogram" -version = "3.0.0-beta.3" +version = "3.0.0-beta.4" description = "Modern and fully asynchronous framework for Telegram Bot API" authors = [ "Alex Root Junior ", @@ -39,7 +39,7 @@ classifiers = [ python = "^3.8" magic-filter = "^1.0.7" aiohttp = "^3.8.1" -pydantic = "^1.9.0" +pydantic = "^1.9.1" aiofiles = "^0.8.0" # Fast uvloop = { version = "^0.16.0", markers = "sys_platform == 'darwin' or sys_platform == 'linux'", optional = true } @@ -48,32 +48,31 @@ Babel = { version = "^2.9.1", optional = true } # Proxy aiohttp-socks = { version = "^0.7.1", optional = true } # Redis -redis = { version = "^4.2.2", optional = true } +redis = {version = "^4.3.3", optional = true} # Docs Sphinx = { version = "^4.2.0", optional = true } -sphinx-intl = { version = "^2.0.1", optional = true } +sphinx-intl = {version = "^2.0.1", optional = true} sphinx-autobuild = { version = "^2021.3.14", optional = true } sphinx-copybutton = { version = "^0.5.0", optional = true } -furo = { version = "^2022.4.7", optional = true } +furo = {version = "^2022.6.21", optional = true} sphinx-prompt = { version = "^1.5.0", optional = true } Sphinx-Substitution-Extensions = { version = "^2020.9.30", optional = true } towncrier = { version = "^21.9.0", optional = true } pygments = { version = "^2.4", optional = true } -pymdown-extensions = { version = "^9.3", optional = true } +pymdown-extensions = {version = "^9.5", optional = true} markdown-include = { version = "^0.6", optional = true } -Pygments = { version = "^2.11.2", optional = true } +Pygments = {version = "^2.12.0", optional = true} [tool.poetry.dev-dependencies] -ipython = "^8.1.1" black = "^22.1.0" isort = "^5.10.1" flake8 = "^4.0.1" -mypy = "^0.942" +mypy = "^0.961" pytest = "^7.1.2" pytest-html = "^3.1.1" pytest-asyncio = "^0.18.1" pytest-lazy-fixture = "^0.6.3" -pytest-mock = "^3.7.0" +pytest-mock = "^3.8.1" pytest-mypy = "^0.9.1" pytest-cov = "^3.0.0" pytest-aiohttp = "^1.0.4" @@ -81,10 +80,9 @@ aresponses = "^2.1.5" asynctest = "^0.13.0" toml = "^0.10.2" -pre-commit = "^2.17.0" +pre-commit = "^2.19.0" packaging = "^21.3" -typing-extensions = "^4.1.1" -sentry-sdk = "^1.5.5" +typing-extensions = "^4.2.0" [tool.poetry.extras] diff --git a/tests/test_api/test_methods/test_create_invoice_link.py b/tests/test_api/test_methods/test_create_invoice_link.py new file mode 100644 index 00000000..2a3e16ac --- /dev/null +++ b/tests/test_api/test_methods/test_create_invoice_link.py @@ -0,0 +1,43 @@ +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" + ) + + response: str = await CreateInvoiceLink( + title="test", + description="test", + payload="test", + provider_token="test", + currency="BTC", + prices=[LabeledPrice(label="Test", amount=1)], + ) + request: Request = bot.get_request() + 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" + ) + + response: str = await bot.create_invoice_link( + title="test", + description="test", + payload="test", + provider_token="test", + currency="BTC", + prices=[LabeledPrice(label="Test", amount=1)], + ) + request: Request = bot.get_request() + assert request.method == "createInvoiceLink" + assert response == prepare_result.result