From 20d0c979b81632242b2f2a41a39d24d750de7b11 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sun, 14 Mar 2021 23:15:19 +0200 Subject: [PATCH] Regenerate corresponding to Bot API 5.1 --- .apiversion | 2 +- aiogram/__init__.py | 2 +- aiogram/client/bot.py | 381 +++++++----------- aiogram/dispatcher/dispatcher.py | 6 + aiogram/dispatcher/filters/__init__.py | 2 + aiogram/dispatcher/filters/content_types.py | 2 +- aiogram/dispatcher/handler/__init__.py | 2 + aiogram/dispatcher/router.py | 5 + aiogram/methods/__init__.py | 6 + aiogram/methods/copy_message.py | 2 +- aiogram/methods/create_chat_invite_link.py | 31 ++ aiogram/methods/edit_chat_invite_link.py | 33 ++ aiogram/methods/export_chat_invite_link.py | 4 +- aiogram/methods/get_updates.py | 2 +- aiogram/methods/kick_chat_member.py | 2 + aiogram/methods/promote_chat_member.py | 16 +- aiogram/methods/revoke_chat_invite_link.py | 29 ++ aiogram/methods/send_dice.py | 2 +- aiogram/methods/set_webhook.py | 2 +- aiogram/types/__init__.py | 12 + aiogram/types/chat.py | 6 +- aiogram/types/chat_invite_link.py | 29 ++ aiogram/types/chat_member.py | 5 +- aiogram/types/chat_member_updated.py | 35 ++ aiogram/types/contact.py | 2 +- aiogram/types/dice.py | 3 +- aiogram/types/inline_query_result.py | 2 + aiogram/types/message.py | 202 +++++++++- .../message_auto_delete_timer_changed.py | 19 + aiogram/types/response_parameters.py | 2 +- aiogram/types/update.py | 5 + aiogram/types/user.py | 2 +- aiogram/types/voice_chat_ended.py | 19 + .../types/voice_chat_participants_invited.py | 19 + aiogram/types/voice_chat_started.py | 16 + aiogram/types/webhook_info.py | 2 +- docs/_api_version.md | 2 +- docs/_package_version.md | 2 +- docs2/api/methods/add_sticker_to_set.rst | 2 +- docs2/api/methods/answer_callback_query.rst | 2 +- docs2/api/methods/answer_inline_query.rst | 2 +- .../api/methods/answer_pre_checkout_query.rst | 2 +- docs2/api/methods/answer_shipping_query.rst | 2 +- docs2/api/methods/close.rst | 2 +- docs2/api/methods/copy_message.rst | 2 +- docs2/api/methods/create_chat_invite_link.rst | 51 +++ docs2/api/methods/create_new_sticker_set.rst | 2 +- docs2/api/methods/delete_chat_photo.rst | 2 +- docs2/api/methods/delete_chat_sticker_set.rst | 2 +- docs2/api/methods/delete_message.rst | 2 +- docs2/api/methods/delete_sticker_from_set.rst | 2 +- docs2/api/methods/delete_webhook.rst | 2 +- docs2/api/methods/edit_chat_invite_link.rst | 51 +++ docs2/api/methods/edit_message_caption.rst | 2 +- .../methods/edit_message_live_location.rst | 2 +- docs2/api/methods/edit_message_media.rst | 2 +- .../api/methods/edit_message_reply_markup.rst | 2 +- docs2/api/methods/edit_message_text.rst | 2 +- docs2/api/methods/export_chat_invite_link.rst | 2 +- docs2/api/methods/forward_message.rst | 2 +- docs2/api/methods/get_chat.rst | 1 - docs2/api/methods/get_chat_administrators.rst | 1 - docs2/api/methods/get_chat_member.rst | 1 - docs2/api/methods/get_chat_members_count.rst | 1 - docs2/api/methods/get_file.rst | 1 - docs2/api/methods/get_game_high_scores.rst | 1 - docs2/api/methods/get_me.rst | 1 - docs2/api/methods/get_my_commands.rst | 1 - docs2/api/methods/get_sticker_set.rst | 1 - docs2/api/methods/get_updates.rst | 1 - docs2/api/methods/get_user_profile_photos.rst | 1 - docs2/api/methods/get_webhook_info.rst | 1 - docs2/api/methods/index.rst | 4 +- docs2/api/methods/kick_chat_member.rst | 2 +- docs2/api/methods/leave_chat.rst | 2 +- docs2/api/methods/log_out.rst | 2 +- docs2/api/methods/pin_chat_message.rst | 2 +- docs2/api/methods/promote_chat_member.rst | 2 +- docs2/api/methods/restrict_chat_member.rst | 2 +- docs2/api/methods/revoke_chat_invite_link.rst | 51 +++ docs2/api/methods/send_animation.rst | 2 +- docs2/api/methods/send_audio.rst | 2 +- docs2/api/methods/send_chat_action.rst | 2 +- docs2/api/methods/send_contact.rst | 2 +- docs2/api/methods/send_dice.rst | 2 +- docs2/api/methods/send_document.rst | 2 +- docs2/api/methods/send_game.rst | 2 +- docs2/api/methods/send_invoice.rst | 2 +- docs2/api/methods/send_location.rst | 2 +- docs2/api/methods/send_media_group.rst | 2 +- docs2/api/methods/send_message.rst | 2 +- docs2/api/methods/send_photo.rst | 2 +- docs2/api/methods/send_poll.rst | 2 +- docs2/api/methods/send_sticker.rst | 2 +- docs2/api/methods/send_venue.rst | 2 +- docs2/api/methods/send_video.rst | 2 +- docs2/api/methods/send_video_note.rst | 2 +- docs2/api/methods/send_voice.rst | 2 +- .../set_chat_administrator_custom_title.rst | 2 +- docs2/api/methods/set_chat_description.rst | 2 +- docs2/api/methods/set_chat_permissions.rst | 2 +- docs2/api/methods/set_chat_photo.rst | 1 - docs2/api/methods/set_chat_sticker_set.rst | 2 +- docs2/api/methods/set_chat_title.rst | 2 +- docs2/api/methods/set_game_score.rst | 2 +- docs2/api/methods/set_my_commands.rst | 2 +- .../api/methods/set_passport_data_errors.rst | 2 +- .../methods/set_sticker_position_in_set.rst | 2 +- docs2/api/methods/set_sticker_set_thumb.rst | 2 +- docs2/api/methods/set_webhook.rst | 2 +- .../methods/stop_message_live_location.rst | 2 +- docs2/api/methods/stop_poll.rst | 2 +- docs2/api/methods/unban_chat_member.rst | 2 +- docs2/api/methods/unpin_all_chat_messages.rst | 2 +- docs2/api/methods/unpin_chat_message.rst | 2 +- docs2/api/methods/upload_sticker_file.rst | 1 - docs2/api/types/animation.rst | 2 +- docs2/api/types/audio.rst | 2 +- docs2/api/types/bot_command.rst | 2 +- docs2/api/types/callback_game.rst | 2 +- docs2/api/types/callback_query.rst | 2 +- docs2/api/types/chat.rst | 2 +- docs2/api/types/chat_invite_link.rst | 9 + docs2/api/types/chat_location.rst | 2 +- docs2/api/types/chat_member.rst | 2 +- docs2/api/types/chat_member_updated.rst | 9 + docs2/api/types/chat_permissions.rst | 2 +- docs2/api/types/chat_photo.rst | 2 +- docs2/api/types/chosen_inline_result.rst | 2 +- docs2/api/types/contact.rst | 2 +- docs2/api/types/dice.rst | 2 +- docs2/api/types/document.rst | 2 +- docs2/api/types/encrypted_credentials.rst | 2 +- .../api/types/encrypted_passport_element.rst | 2 +- docs2/api/types/file.rst | 2 +- docs2/api/types/force_reply.rst | 2 +- docs2/api/types/game.rst | 2 +- docs2/api/types/game_high_score.rst | 2 +- docs2/api/types/index.rst | 7 +- docs2/api/types/inline_keyboard_button.rst | 2 +- docs2/api/types/inline_keyboard_markup.rst | 2 +- docs2/api/types/inline_query.rst | 2 +- docs2/api/types/inline_query_result.rst | 2 +- .../api/types/inline_query_result_article.rst | 2 +- docs2/api/types/inline_query_result_audio.rst | 2 +- .../inline_query_result_cached_audio.rst | 2 +- .../inline_query_result_cached_document.rst | 2 +- .../types/inline_query_result_cached_gif.rst | 2 +- .../inline_query_result_cached_mpeg4_gif.rst | 2 +- .../inline_query_result_cached_photo.rst | 2 +- .../inline_query_result_cached_sticker.rst | 2 +- .../inline_query_result_cached_video.rst | 2 +- .../inline_query_result_cached_voice.rst | 2 +- .../api/types/inline_query_result_contact.rst | 2 +- .../types/inline_query_result_document.rst | 2 +- docs2/api/types/inline_query_result_game.rst | 2 +- docs2/api/types/inline_query_result_gif.rst | 2 +- .../types/inline_query_result_location.rst | 2 +- .../types/inline_query_result_mpeg4_gif.rst | 2 +- docs2/api/types/inline_query_result_photo.rst | 2 +- docs2/api/types/inline_query_result_venue.rst | 2 +- docs2/api/types/inline_query_result_video.rst | 2 +- docs2/api/types/inline_query_result_voice.rst | 2 +- .../types/input_contact_message_content.rst | 2 +- docs2/api/types/input_file.rst | 2 +- .../types/input_location_message_content.rst | 2 +- docs2/api/types/input_media.rst | 2 +- docs2/api/types/input_media_animation.rst | 2 +- docs2/api/types/input_media_audio.rst | 2 +- docs2/api/types/input_media_document.rst | 2 +- docs2/api/types/input_media_photo.rst | 2 +- docs2/api/types/input_media_video.rst | 2 +- docs2/api/types/input_message_content.rst | 2 +- .../api/types/input_text_message_content.rst | 2 +- .../api/types/input_venue_message_content.rst | 2 +- docs2/api/types/invoice.rst | 2 +- docs2/api/types/keyboard_button.rst | 2 +- docs2/api/types/keyboard_button_poll_type.rst | 2 +- docs2/api/types/labeled_price.rst | 2 +- docs2/api/types/location.rst | 2 +- docs2/api/types/login_url.rst | 2 +- docs2/api/types/mask_position.rst | 2 +- docs2/api/types/message.rst | 2 +- .../message_auto_delete_timer_changed.rst | 9 + docs2/api/types/message_entity.rst | 2 +- docs2/api/types/message_id.rst | 2 +- docs2/api/types/order_info.rst | 2 +- docs2/api/types/passport_data.rst | 2 +- docs2/api/types/passport_element_error.rst | 2 +- .../passport_element_error_data_field.rst | 2 +- .../api/types/passport_element_error_file.rst | 2 +- .../types/passport_element_error_files.rst | 2 +- .../passport_element_error_front_side.rst | 2 +- .../passport_element_error_reverse_side.rst | 2 +- .../types/passport_element_error_selfie.rst | 2 +- ...assport_element_error_translation_file.rst | 2 +- ...ssport_element_error_translation_files.rst | 2 +- .../passport_element_error_unspecified.rst | 2 +- docs2/api/types/passport_file.rst | 2 +- docs2/api/types/photo_size.rst | 2 +- docs2/api/types/poll.rst | 2 +- docs2/api/types/poll_answer.rst | 2 +- docs2/api/types/poll_option.rst | 2 +- docs2/api/types/pre_checkout_query.rst | 2 +- docs2/api/types/proximity_alert_triggered.rst | 2 +- docs2/api/types/reply_keyboard_markup.rst | 2 +- docs2/api/types/reply_keyboard_remove.rst | 2 +- docs2/api/types/response_parameters.rst | 2 +- docs2/api/types/shipping_address.rst | 2 +- docs2/api/types/shipping_option.rst | 2 +- docs2/api/types/shipping_query.rst | 2 +- docs2/api/types/sticker.rst | 2 +- docs2/api/types/sticker_set.rst | 2 +- docs2/api/types/successful_payment.rst | 2 +- docs2/api/types/update.rst | 2 +- docs2/api/types/user.rst | 2 +- docs2/api/types/user_profile_photos.rst | 2 +- docs2/api/types/venue.rst | 2 +- docs2/api/types/video.rst | 2 +- docs2/api/types/video_note.rst | 2 +- docs2/api/types/voice.rst | 2 +- docs2/api/types/voice_chat_ended.rst | 9 + .../types/voice_chat_participants_invited.rst | 9 + docs2/api/types/voice_chat_started.rst | 9 + docs2/api/types/webhook_info.rst | 2 +- .../dispatcher/class_based_handlers/index.rst | 1 + pyproject.toml | 2 +- 227 files changed, 1039 insertions(+), 435 deletions(-) create mode 100644 aiogram/methods/create_chat_invite_link.py create mode 100644 aiogram/methods/edit_chat_invite_link.py create mode 100644 aiogram/methods/revoke_chat_invite_link.py create mode 100644 aiogram/types/chat_invite_link.py create mode 100644 aiogram/types/chat_member_updated.py create mode 100644 aiogram/types/message_auto_delete_timer_changed.py create mode 100644 aiogram/types/voice_chat_ended.py create mode 100644 aiogram/types/voice_chat_participants_invited.py create mode 100644 aiogram/types/voice_chat_started.py create mode 100644 docs2/api/methods/create_chat_invite_link.rst create mode 100644 docs2/api/methods/edit_chat_invite_link.rst create mode 100644 docs2/api/methods/revoke_chat_invite_link.rst create mode 100644 docs2/api/types/chat_invite_link.rst create mode 100644 docs2/api/types/chat_member_updated.rst create mode 100644 docs2/api/types/message_auto_delete_timer_changed.rst create mode 100644 docs2/api/types/voice_chat_ended.rst create mode 100644 docs2/api/types/voice_chat_participants_invited.rst create mode 100644 docs2/api/types/voice_chat_started.rst diff --git a/.apiversion b/.apiversion index 899dd4f5..83364075 100644 --- a/.apiversion +++ b/.apiversion @@ -1 +1 @@ -4.9 \ No newline at end of file +5.1 \ No newline at end of file diff --git a/aiogram/__init__.py b/aiogram/__init__.py index f83bb4cb..72f2a21c 100644 --- a/aiogram/__init__.py +++ b/aiogram/__init__.py @@ -28,4 +28,4 @@ __all__ = ( ) __version__ = "3.0.0-alpha.6" -__api_version__ = "4.9" +__api_version__ = "5.1" diff --git a/aiogram/client/bot.py b/aiogram/client/bot.py index 695b7b28..b22028c8 100644 --- a/aiogram/client/bot.py +++ b/aiogram/client/bot.py @@ -30,12 +30,14 @@ from ..methods import ( AnswerShippingQuery, Close, CopyMessage, + CreateChatInviteLink, CreateNewStickerSet, DeleteChatPhoto, DeleteChatStickerSet, DeleteMessage, DeleteStickerFromSet, DeleteWebhook, + EditChatInviteLink, EditMessageCaption, EditMessageLiveLocation, EditMessageMedia, @@ -61,6 +63,7 @@ from ..methods import ( PinChatMessage, PromoteChatMember, RestrictChatMember, + RevokeChatInviteLink, SendAnimation, SendAudio, SendChatAction, @@ -103,6 +106,7 @@ from ..types import ( UNSET, BotCommand, Chat, + ChatInviteLink, ChatMember, ChatPermissions, Downloadable, @@ -141,10 +145,7 @@ T = TypeVar("T") class Bot(ContextInstanceMixin["Bot"]): def __init__( - self, - token: str, - session: Optional[BaseSession] = None, - parse_mode: Optional[str] = None, + self, token: str, session: Optional[BaseSession] = None, parse_mode: Optional[str] = None, ) -> None: """ Bot class @@ -343,15 +344,12 @@ class Bot(ContextInstanceMixin["Bot"]): :param offset: Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as :class:`aiogram.methods.get_updates.GetUpdates` is called with an *offset* higher than its *update_id*. The negative offset can be specified to retrieve updates starting from *-offset* update from the end of the updates queue. All previous updates will forgotten. :param limit: Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100. :param timeout: Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only. - :param allowed_updates: A JSON-serialized list of the update types you want your bot to receive. For example, specify ['message', 'edited_channel_post', 'callback_query'] to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all updates regardless of type (default). If not specified, the previous setting will be used. + :param allowed_updates: A JSON-serialized list of the update types you want your bot to receive. For example, specify ['message', 'edited_channel_post', 'callback_query'] to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member* (default). If not specified, the previous setting will be used. :param request_timeout: Request timeout :return: An Array of Update objects is returned. """ call = GetUpdates( - offset=offset, - limit=limit, - timeout=timeout, - allowed_updates=allowed_updates, + offset=offset, limit=limit, timeout=timeout, allowed_updates=allowed_updates, ) return await self(call, request_timeout=request_timeout) @@ -384,7 +382,7 @@ class Bot(ContextInstanceMixin["Bot"]): :param certificate: Upload your public key certificate so that the root certificate in use can be checked. See our `self-signed guide `_ for details. :param ip_address: The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS :param max_connections: Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to *40*. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput. - :param allowed_updates: A JSON-serialized list of the update types you want your bot to receive. For example, specify ['message', 'edited_channel_post', 'callback_query'] to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all updates regardless of type (default). If not specified, the previous setting will be used. + :param allowed_updates: A JSON-serialized list of the update types you want your bot to receive. For example, specify ['message', 'edited_channel_post', 'callback_query'] to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member* (default). If not specified, the previous setting will be used. :param drop_pending_updates: Pass :code:`True` to drop all pending updates :param request_timeout: Request timeout :return: Returns True on success. @@ -400,9 +398,7 @@ class Bot(ContextInstanceMixin["Bot"]): return await self(call, request_timeout=request_timeout) async def delete_webhook( - self, - drop_pending_updates: Optional[bool] = None, - request_timeout: Optional[int] = None, + self, drop_pending_updates: Optional[bool] = None, request_timeout: Optional[int] = None, ) -> bool: """ Use this method to remove webhook integration if you decide to switch back to :class:`aiogram.methods.get_updates.GetUpdates`. Returns :code:`True` on success. @@ -413,15 +409,10 @@ class Bot(ContextInstanceMixin["Bot"]): :param request_timeout: Request timeout :return: Returns True on success. """ - call = DeleteWebhook( - drop_pending_updates=drop_pending_updates, - ) + call = DeleteWebhook(drop_pending_updates=drop_pending_updates,) return await self(call, request_timeout=request_timeout) - async def get_webhook_info( - self, - request_timeout: Optional[int] = None, - ) -> WebhookInfo: + async def get_webhook_info(self, request_timeout: Optional[int] = None,) -> WebhookInfo: """ Use this method to get current webhook status. Requires no parameters. On success, returns a :class:`aiogram.types.webhook_info.WebhookInfo` object. If the bot is using :class:`aiogram.methods.get_updates.GetUpdates`, will return an object with the *url* field empty. @@ -439,10 +430,7 @@ class Bot(ContextInstanceMixin["Bot"]): # Source: https://core.telegram.org/bots/api#available-methods # ============================================================================================= - async def get_me( - self, - request_timeout: Optional[int] = None, - ) -> User: + async def get_me(self, request_timeout: Optional[int] = None,) -> User: """ A simple method for testing your bot's auth token. Requires no parameters. Returns basic information about the bot in form of a :class:`aiogram.types.user.User` object. @@ -454,10 +442,7 @@ class Bot(ContextInstanceMixin["Bot"]): call = GetMe() return await self(call, request_timeout=request_timeout) - async def log_out( - self, - request_timeout: Optional[int] = None, - ) -> bool: + async def log_out(self, request_timeout: Optional[int] = None,) -> bool: """ Use this method to log out from the cloud Bot API server before launching the bot locally. You **must** log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns :code:`True` on success. Requires no parameters. @@ -469,10 +454,7 @@ class Bot(ContextInstanceMixin["Bot"]): call = LogOut() return await self(call, request_timeout=request_timeout) - async def close( - self, - request_timeout: Optional[int] = None, - ) -> bool: + async def close(self, request_timeout: Optional[int] = None,) -> bool: """ Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns :code:`True` on success. Requires no parameters. @@ -575,7 +557,7 @@ class Bot(ContextInstanceMixin["Bot"]): request_timeout: Optional[int] = None, ) -> MessageId: """ - Use this method to copy messages of any kind. The method is analogous to the method :class:`aiogram.methods.forward_messages.ForwardMessages`, but the copied message doesn't have a link to the original message. Returns the :class:`aiogram.types.message_id.MessageId` of the sent message on success. + Use this method to copy messages of any kind. The method is analogous to the method :class:`aiogram.methods.forward_message.ForwardMessage`, but the copied message doesn't have a link to the original message. Returns the :class:`aiogram.types.message_id.MessageId` of the sent message on success. Source: https://core.telegram.org/bots/api#copymessage @@ -1314,7 +1296,7 @@ class Bot(ContextInstanceMixin["Bot"]): Source: https://core.telegram.org/bots/api#senddice :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '⚽', or '🎰'. Dice can have values 1-6 for '🎲' and '🎯', values 1-5 for '🏀' and '⚽', and values 1-64 for '🎰'. Defaults to '🎲' + :param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '⚽', '🎳', or '🎰'. Dice can have values 1-6 for '🎲', '🎯' and '🎳', values 1-5 for '🏀' and '⚽', and values 1-64 for '🎰'. Defaults to '🎲' :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param reply_to_message_id: If the message is a reply, ID of the original message :param allow_sending_without_reply: Pass :code:`True`, if the message should be sent even if the specified replied-to message is not found @@ -1333,10 +1315,7 @@ class Bot(ContextInstanceMixin["Bot"]): return await self(call, request_timeout=request_timeout) async def send_chat_action( - self, - chat_id: Union[int, str], - action: str, - request_timeout: Optional[int] = None, + self, chat_id: Union[int, str], action: str, request_timeout: Optional[int] = None, ) -> bool: """ Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns :code:`True` on success. @@ -1352,10 +1331,7 @@ class Bot(ContextInstanceMixin["Bot"]): :param request_timeout: Request timeout :return: Returns True on success. """ - call = SendChatAction( - chat_id=chat_id, - action=action, - ) + call = SendChatAction(chat_id=chat_id, action=action,) return await self(call, request_timeout=request_timeout) async def get_user_profile_photos( @@ -1376,18 +1352,10 @@ class Bot(ContextInstanceMixin["Bot"]): :param request_timeout: Request timeout :return: Returns a UserProfilePhotos object. """ - call = GetUserProfilePhotos( - user_id=user_id, - offset=offset, - limit=limit, - ) + call = GetUserProfilePhotos(user_id=user_id, offset=offset, limit=limit,) return await self(call, request_timeout=request_timeout) - async def get_file( - self, - file_id: str, - request_timeout: Optional[int] = None, - ) -> File: + async def get_file(self, file_id: str, request_timeout: Optional[int] = None,) -> File: """ Use this method to get basic info about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a :class:`aiogram.types.file.File` object is returned. The file can then be downloaded via the link :code:`https://api.telegram.org/file/bot/`, where :code:`` is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling :class:`aiogram.methods.get_file.GetFile` again. **Note:** This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received. @@ -1398,9 +1366,7 @@ class Bot(ContextInstanceMixin["Bot"]): :param request_timeout: Request timeout :return: On success, a File object is returned. """ - call = GetFile( - file_id=file_id, - ) + call = GetFile(file_id=file_id,) return await self(call, request_timeout=request_timeout) async def kick_chat_member( @@ -1408,6 +1374,7 @@ class Bot(ContextInstanceMixin["Bot"]): chat_id: Union[int, str], user_id: int, until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, + revoke_messages: Optional[bool] = None, request_timeout: Optional[int] = None, ) -> bool: """ @@ -1418,6 +1385,7 @@ class Bot(ContextInstanceMixin["Bot"]): :param chat_id: Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`) :param user_id: Unique identifier of the target user :param until_date: Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only. + :param revoke_messages: Pass :code:`True` to delete all messages from the chat for the user that is being removed. If :code:`False`, the user will be able to see messages in the group that were sent before the user was removed. Always :code:`True` for supergroups and channels. :param request_timeout: Request timeout :return: In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc. Returns True on success. @@ -1426,6 +1394,7 @@ class Bot(ContextInstanceMixin["Bot"]): chat_id=chat_id, user_id=user_id, until_date=until_date, + revoke_messages=revoke_messages, ) return await self(call, request_timeout=request_timeout) @@ -1448,11 +1417,7 @@ class Bot(ContextInstanceMixin["Bot"]): :return: The user will not return to the group or channel automatically, but will be able to join via link, etc. Returns True on success. """ - call = UnbanChatMember( - chat_id=chat_id, - user_id=user_id, - only_if_banned=only_if_banned, - ) + call = UnbanChatMember(chat_id=chat_id, user_id=user_id, only_if_banned=only_if_banned,) return await self(call, request_timeout=request_timeout) async def restrict_chat_member( @@ -1476,10 +1441,7 @@ class Bot(ContextInstanceMixin["Bot"]): :return: Returns True on success. """ call = RestrictChatMember( - chat_id=chat_id, - user_id=user_id, - permissions=permissions, - until_date=until_date, + chat_id=chat_id, user_id=user_id, permissions=permissions, until_date=until_date, ) return await self(call, request_timeout=request_timeout) @@ -1488,14 +1450,16 @@ class Bot(ContextInstanceMixin["Bot"]): chat_id: Union[int, str], user_id: int, is_anonymous: Optional[bool] = None, - can_change_info: Optional[bool] = None, + can_manage_chat: Optional[bool] = None, can_post_messages: Optional[bool] = None, can_edit_messages: Optional[bool] = None, can_delete_messages: Optional[bool] = None, - can_invite_users: Optional[bool] = None, + can_manage_voice_chats: Optional[bool] = None, can_restrict_members: Optional[bool] = None, - can_pin_messages: Optional[bool] = None, can_promote_members: Optional[bool] = None, + can_change_info: Optional[bool] = None, + can_invite_users: Optional[bool] = None, + can_pin_messages: Optional[bool] = None, request_timeout: Optional[int] = None, ) -> bool: """ @@ -1506,14 +1470,16 @@ 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 user_id: Unique identifier of the target user :param is_anonymous: Pass :code:`True`, if the administrator's presence in the chat is hidden - :param can_change_info: Pass True, if the administrator can change chat title, photo and other settings + :param can_manage_chat: Pass True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege :param can_post_messages: Pass True, if the administrator can create channel posts, channels only :param can_edit_messages: Pass True, if the administrator can edit messages of other users and can pin messages, channels only :param can_delete_messages: Pass True, if the administrator can delete messages of other users - :param can_invite_users: Pass True, if the administrator can invite new users to the chat + :param can_manage_voice_chats: Pass True, if the administrator can manage voice chats, supergroups only :param can_restrict_members: Pass True, if the administrator can restrict, ban or unban chat members - :param can_pin_messages: Pass True, if the administrator can pin messages, supergroups only :param can_promote_members: Pass True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him) + :param can_change_info: Pass True, if the administrator can change chat title, photo and other settings + :param can_invite_users: Pass True, if the administrator can invite new users to the chat + :param can_pin_messages: Pass True, if the administrator can pin messages, supergroups only :param request_timeout: Request timeout :return: Returns True on success. """ @@ -1521,14 +1487,16 @@ class Bot(ContextInstanceMixin["Bot"]): chat_id=chat_id, user_id=user_id, is_anonymous=is_anonymous, - can_change_info=can_change_info, + can_manage_chat=can_manage_chat, can_post_messages=can_post_messages, can_edit_messages=can_edit_messages, can_delete_messages=can_delete_messages, - can_invite_users=can_invite_users, + can_manage_voice_chats=can_manage_voice_chats, can_restrict_members=can_restrict_members, - can_pin_messages=can_pin_messages, can_promote_members=can_promote_members, + can_change_info=can_change_info, + can_invite_users=can_invite_users, + can_pin_messages=can_pin_messages, ) return await self(call, request_timeout=request_timeout) @@ -1551,9 +1519,7 @@ class Bot(ContextInstanceMixin["Bot"]): :return: Returns True on success. """ call = SetChatAdministratorCustomTitle( - chat_id=chat_id, - user_id=user_id, - custom_title=custom_title, + chat_id=chat_id, user_id=user_id, custom_title=custom_title, ) return await self(call, request_timeout=request_timeout) @@ -1573,21 +1539,16 @@ class Bot(ContextInstanceMixin["Bot"]): :param request_timeout: Request timeout :return: Returns True on success. """ - call = SetChatPermissions( - chat_id=chat_id, - permissions=permissions, - ) + call = SetChatPermissions(chat_id=chat_id, permissions=permissions,) return await self(call, request_timeout=request_timeout) async def export_chat_invite_link( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, + self, chat_id: Union[int, str], request_timeout: Optional[int] = None, ) -> str: """ - Use this method to generate a new invite link for a chat; any previously generated link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns the new invite link as *String* on success. + Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns the new invite link as *String* on success. - Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` — after this the link will become available to the bot via the :class:`aiogram.methods.get_chat.GetChat` method. If your bot needs to generate a new invite link replacing its previous one, use :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` again. + Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` or by calling the :class:`aiogram.methods.get_chat.GetChat` method. If your bot needs to generate a new primary invite link replacing its previous one, use :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` again. Source: https://core.telegram.org/bots/api#exportchatinvitelink @@ -1595,16 +1556,78 @@ class Bot(ContextInstanceMixin["Bot"]): :param request_timeout: Request timeout :return: Returns the new invite link as String on success. """ - call = ExportChatInviteLink( - chat_id=chat_id, + call = ExportChatInviteLink(chat_id=chat_id,) + return await self(call, request_timeout=request_timeout) + + async def create_chat_invite_link( + self, + chat_id: Union[int, str], + expire_date: Optional[int] = None, + member_limit: Optional[int] = None, + request_timeout: Optional[int] = None, + ) -> ChatInviteLink: + """ + Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. The link can be revoked using the method :class:`aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink`. Returns the new invite link as :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. + + Source: https://core.telegram.org/bots/api#createchatinvitelink + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param 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 request_timeout: Request timeout + :return: Returns the new invite link as ChatInviteLink object. + """ + call = CreateChatInviteLink( + chat_id=chat_id, expire_date=expire_date, member_limit=member_limit, ) return await self(call, request_timeout=request_timeout) - async def set_chat_photo( + async def edit_chat_invite_link( self, chat_id: Union[int, str], - photo: InputFile, + invite_link: str, + expire_date: Optional[int] = None, + member_limit: Optional[int] = None, request_timeout: Optional[int] = None, + ) -> ChatInviteLink: + """ + Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns the edited invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. + + Source: https://core.telegram.org/bots/api#editchatinvitelink + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param invite_link: The invite link to edit + :param 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 request_timeout: Request timeout + :return: Returns the edited invite link as a ChatInviteLink object. + """ + call = EditChatInviteLink( + chat_id=chat_id, + invite_link=invite_link, + expire_date=expire_date, + member_limit=member_limit, + ) + return await self(call, request_timeout=request_timeout) + + async def revoke_chat_invite_link( + self, chat_id: Union[int, str], invite_link: str, request_timeout: Optional[int] = None, + ) -> ChatInviteLink: + """ + Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns the revoked invite link as :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. + + Source: https://core.telegram.org/bots/api#revokechatinvitelink + + :param chat_id: Unique identifier of the target chat or username of the target channel (in the format :code:`@channelusername`) + :param invite_link: The invite link to revoke + :param request_timeout: Request timeout + :return: Returns the revoked invite link as ChatInviteLink object. + """ + call = RevokeChatInviteLink(chat_id=chat_id, invite_link=invite_link,) + return await self(call, request_timeout=request_timeout) + + async def set_chat_photo( + self, chat_id: Union[int, str], photo: InputFile, request_timeout: Optional[int] = None, ) -> bool: """ Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns :code:`True` on success. @@ -1616,16 +1639,11 @@ class Bot(ContextInstanceMixin["Bot"]): :param request_timeout: Request timeout :return: Returns True on success. """ - call = SetChatPhoto( - chat_id=chat_id, - photo=photo, - ) + call = SetChatPhoto(chat_id=chat_id, photo=photo,) return await self(call, request_timeout=request_timeout) async def delete_chat_photo( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, + self, chat_id: Union[int, str], request_timeout: Optional[int] = None, ) -> bool: """ Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns :code:`True` on success. @@ -1636,16 +1654,11 @@ class Bot(ContextInstanceMixin["Bot"]): :param request_timeout: Request timeout :return: Returns True on success. """ - call = DeleteChatPhoto( - chat_id=chat_id, - ) + call = DeleteChatPhoto(chat_id=chat_id,) return await self(call, request_timeout=request_timeout) async def set_chat_title( - self, - chat_id: Union[int, str], - title: str, - request_timeout: Optional[int] = None, + self, chat_id: Union[int, str], title: str, request_timeout: Optional[int] = None, ) -> bool: """ Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns :code:`True` on success. @@ -1657,10 +1670,7 @@ class Bot(ContextInstanceMixin["Bot"]): :param request_timeout: Request timeout :return: Returns True on success. """ - call = SetChatTitle( - chat_id=chat_id, - title=title, - ) + call = SetChatTitle(chat_id=chat_id, title=title,) return await self(call, request_timeout=request_timeout) async def set_chat_description( @@ -1679,10 +1689,7 @@ class Bot(ContextInstanceMixin["Bot"]): :param request_timeout: Request timeout :return: Returns True on success. """ - call = SetChatDescription( - chat_id=chat_id, - description=description, - ) + call = SetChatDescription(chat_id=chat_id, description=description,) return await self(call, request_timeout=request_timeout) async def pin_chat_message( @@ -1704,9 +1711,7 @@ class Bot(ContextInstanceMixin["Bot"]): :return: Returns True on success. """ call = PinChatMessage( - chat_id=chat_id, - message_id=message_id, - disable_notification=disable_notification, + chat_id=chat_id, message_id=message_id, disable_notification=disable_notification, ) return await self(call, request_timeout=request_timeout) @@ -1726,16 +1731,11 @@ class Bot(ContextInstanceMixin["Bot"]): :param request_timeout: Request timeout :return: Returns True on success. """ - call = UnpinChatMessage( - chat_id=chat_id, - message_id=message_id, - ) + call = UnpinChatMessage(chat_id=chat_id, message_id=message_id,) return await self(call, request_timeout=request_timeout) async def unpin_all_chat_messages( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, + self, chat_id: Union[int, str], request_timeout: Optional[int] = None, ) -> bool: """ Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in a supergroup or 'can_edit_messages' admin right in a channel. Returns :code:`True` on success. @@ -1746,15 +1746,11 @@ class Bot(ContextInstanceMixin["Bot"]): :param request_timeout: Request timeout :return: Returns True on success. """ - call = UnpinAllChatMessages( - chat_id=chat_id, - ) + call = UnpinAllChatMessages(chat_id=chat_id,) return await self(call, request_timeout=request_timeout) async def leave_chat( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, + self, chat_id: Union[int, str], request_timeout: Optional[int] = None, ) -> bool: """ Use this method for your bot to leave a group, supergroup or channel. Returns :code:`True` on success. @@ -1765,15 +1761,11 @@ class Bot(ContextInstanceMixin["Bot"]): :param request_timeout: Request timeout :return: Returns True on success. """ - call = LeaveChat( - chat_id=chat_id, - ) + call = LeaveChat(chat_id=chat_id,) return await self(call, request_timeout=request_timeout) async def get_chat( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, + self, chat_id: Union[int, str], request_timeout: Optional[int] = None, ) -> Chat: """ Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a :class:`aiogram.types.chat.Chat` object on success. @@ -1784,15 +1776,11 @@ class Bot(ContextInstanceMixin["Bot"]): :param request_timeout: Request timeout :return: Returns a Chat object on success. """ - call = GetChat( - chat_id=chat_id, - ) + call = GetChat(chat_id=chat_id,) return await self(call, request_timeout=request_timeout) async def get_chat_administrators( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, + self, chat_id: Union[int, str], request_timeout: Optional[int] = None, ) -> List[ChatMember]: """ Use this method to get a list of administrators in a chat. On success, returns an Array of :class:`aiogram.types.chat_member.ChatMember` objects that contains information about all chat administrators except other bots. If the chat is a group or a supergroup and no administrators were appointed, only the creator will be returned. @@ -1806,15 +1794,11 @@ class Bot(ContextInstanceMixin["Bot"]): supergroup and no administrators were appointed, only the creator will be returned. """ - call = GetChatAdministrators( - chat_id=chat_id, - ) + call = GetChatAdministrators(chat_id=chat_id,) return await self(call, request_timeout=request_timeout) async def get_chat_members_count( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, + self, chat_id: Union[int, str], request_timeout: Optional[int] = None, ) -> int: """ Use this method to get the number of members in a chat. Returns *Int* on success. @@ -1825,16 +1809,11 @@ class Bot(ContextInstanceMixin["Bot"]): :param request_timeout: Request timeout :return: Returns Int on success. """ - call = GetChatMembersCount( - chat_id=chat_id, - ) + call = GetChatMembersCount(chat_id=chat_id,) return await self(call, request_timeout=request_timeout) async def get_chat_member( - self, - chat_id: Union[int, str], - user_id: int, - request_timeout: Optional[int] = None, + self, chat_id: Union[int, str], user_id: int, request_timeout: Optional[int] = None, ) -> ChatMember: """ Use this method to get information about a member of a chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. @@ -1846,10 +1825,7 @@ class Bot(ContextInstanceMixin["Bot"]): :param request_timeout: Request timeout :return: Returns a ChatMember object on success. """ - call = GetChatMember( - chat_id=chat_id, - user_id=user_id, - ) + call = GetChatMember(chat_id=chat_id, user_id=user_id,) return await self(call, request_timeout=request_timeout) async def set_chat_sticker_set( @@ -1869,16 +1845,11 @@ class Bot(ContextInstanceMixin["Bot"]): :return: Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success. """ - call = SetChatStickerSet( - chat_id=chat_id, - sticker_set_name=sticker_set_name, - ) + call = SetChatStickerSet(chat_id=chat_id, sticker_set_name=sticker_set_name,) return await self(call, request_timeout=request_timeout) async def delete_chat_sticker_set( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, + self, chat_id: Union[int, str], request_timeout: Optional[int] = None, ) -> bool: """ Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Use the field *can_set_sticker_set* optionally returned in :class:`aiogram.methods.get_chat.GetChat` requests to check if the bot can use this method. Returns :code:`True` on success. @@ -1890,9 +1861,7 @@ class Bot(ContextInstanceMixin["Bot"]): :return: Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success. """ - call = DeleteChatStickerSet( - chat_id=chat_id, - ) + call = DeleteChatStickerSet(chat_id=chat_id,) return await self(call, request_timeout=request_timeout) async def answer_callback_query( @@ -1929,9 +1898,7 @@ class Bot(ContextInstanceMixin["Bot"]): return await self(call, request_timeout=request_timeout) async def set_my_commands( - self, - commands: List[BotCommand], - request_timeout: Optional[int] = None, + self, commands: List[BotCommand], request_timeout: Optional[int] = None, ) -> bool: """ Use this method to change the list of the bot's commands. Returns :code:`True` on success. @@ -1942,15 +1909,10 @@ class Bot(ContextInstanceMixin["Bot"]): :param request_timeout: Request timeout :return: Returns True on success. """ - call = SetMyCommands( - commands=commands, - ) + call = SetMyCommands(commands=commands,) return await self(call, request_timeout=request_timeout) - async def get_my_commands( - self, - request_timeout: Optional[int] = None, - ) -> List[BotCommand]: + async def get_my_commands(self, request_timeout: Optional[int] = None,) -> List[BotCommand]: """ Use this method to get the current list of the bot's commands. Requires no parameters. Returns Array of :class:`aiogram.types.bot_command.BotCommand` on success. @@ -2125,18 +2087,11 @@ class Bot(ContextInstanceMixin["Bot"]): :param request_timeout: Request timeout :return: On success, the stopped Poll with the final results is returned. """ - call = StopPoll( - chat_id=chat_id, - message_id=message_id, - reply_markup=reply_markup, - ) + call = StopPoll(chat_id=chat_id, message_id=message_id, reply_markup=reply_markup,) return await self(call, request_timeout=request_timeout) async def delete_message( - self, - chat_id: Union[int, str], - message_id: int, - request_timeout: Optional[int] = None, + self, chat_id: Union[int, str], message_id: int, request_timeout: Optional[int] = None, ) -> bool: """ Use this method to delete a message, including service messages, with the following limitations: @@ -2164,10 +2119,7 @@ class Bot(ContextInstanceMixin["Bot"]): :param request_timeout: Request timeout :return: Returns True on success. """ - call = DeleteMessage( - chat_id=chat_id, - message_id=message_id, - ) + call = DeleteMessage(chat_id=chat_id, message_id=message_id,) return await self(call, request_timeout=request_timeout) # ============================================================================================= @@ -2212,9 +2164,7 @@ class Bot(ContextInstanceMixin["Bot"]): return await self(call, request_timeout=request_timeout) async def get_sticker_set( - self, - name: str, - request_timeout: Optional[int] = None, + self, name: str, request_timeout: Optional[int] = None, ) -> StickerSet: """ Use this method to get a sticker set. On success, a :class:`aiogram.types.sticker_set.StickerSet` object is returned. @@ -2225,16 +2175,11 @@ class Bot(ContextInstanceMixin["Bot"]): :param request_timeout: Request timeout :return: On success, a StickerSet object is returned. """ - call = GetStickerSet( - name=name, - ) + call = GetStickerSet(name=name,) return await self(call, request_timeout=request_timeout) async def upload_sticker_file( - self, - user_id: int, - png_sticker: InputFile, - request_timeout: Optional[int] = None, + self, user_id: int, png_sticker: InputFile, request_timeout: Optional[int] = None, ) -> File: """ Use this method to upload a .PNG file with a sticker for later use in *createNewStickerSet* and *addStickerToSet* methods (can be used multiple times). Returns the uploaded :class:`aiogram.types.file.File` on success. @@ -2246,10 +2191,7 @@ class Bot(ContextInstanceMixin["Bot"]): :param request_timeout: Request timeout :return: Returns the uploaded File on success. """ - call = UploadStickerFile( - user_id=user_id, - png_sticker=png_sticker, - ) + call = UploadStickerFile(user_id=user_id, png_sticker=png_sticker,) return await self(call, request_timeout=request_timeout) async def create_new_sticker_set( @@ -2327,10 +2269,7 @@ class Bot(ContextInstanceMixin["Bot"]): return await self(call, request_timeout=request_timeout) async def set_sticker_position_in_set( - self, - sticker: str, - position: int, - request_timeout: Optional[int] = None, + self, sticker: str, position: int, request_timeout: Optional[int] = None, ) -> bool: """ Use this method to move a sticker in a set created by the bot to a specific position. Returns :code:`True` on success. @@ -2342,16 +2281,11 @@ class Bot(ContextInstanceMixin["Bot"]): :param request_timeout: Request timeout :return: Returns True on success. """ - call = SetStickerPositionInSet( - sticker=sticker, - position=position, - ) + call = SetStickerPositionInSet(sticker=sticker, position=position,) return await self(call, request_timeout=request_timeout) async def delete_sticker_from_set( - self, - sticker: str, - request_timeout: Optional[int] = None, + self, sticker: str, request_timeout: Optional[int] = None, ) -> bool: """ Use this method to delete a sticker from a set created by the bot. Returns :code:`True` on success. @@ -2362,9 +2296,7 @@ class Bot(ContextInstanceMixin["Bot"]): :param request_timeout: Request timeout :return: Returns True on success. """ - call = DeleteStickerFromSet( - sticker=sticker, - ) + call = DeleteStickerFromSet(sticker=sticker,) return await self(call, request_timeout=request_timeout) async def set_sticker_set_thumb( @@ -2385,11 +2317,7 @@ class Bot(ContextInstanceMixin["Bot"]): :param request_timeout: Request timeout :return: Returns True on success. """ - call = SetStickerSetThumb( - name=name, - user_id=user_id, - thumb=thumb, - ) + call = SetStickerSetThumb(name=name, user_id=user_id, thumb=thumb,) return await self(call, request_timeout=request_timeout) # ============================================================================================= @@ -2576,9 +2504,7 @@ class Bot(ContextInstanceMixin["Bot"]): :return: On success, True is returned. """ call = AnswerPreCheckoutQuery( - pre_checkout_query_id=pre_checkout_query_id, - ok=ok, - error_message=error_message, + pre_checkout_query_id=pre_checkout_query_id, ok=ok, error_message=error_message, ) return await self(call, request_timeout=request_timeout) @@ -2606,10 +2532,7 @@ class Bot(ContextInstanceMixin["Bot"]): fixed (the contents of the field for which you returned the error must change). Returns True on success. """ - call = SetPassportDataErrors( - user_id=user_id, - errors=errors, - ) + call = SetPassportDataErrors(user_id=user_id, errors=errors,) return await self(call, request_timeout=request_timeout) # ============================================================================================= diff --git a/aiogram/dispatcher/dispatcher.py b/aiogram/dispatcher/dispatcher.py index ff0bf1a7..713b7ae0 100644 --- a/aiogram/dispatcher/dispatcher.py +++ b/aiogram/dispatcher/dispatcher.py @@ -150,6 +150,12 @@ class Dispatcher(Router): elif update.poll_answer: update_type = "poll_answer" event = update.poll_answer + elif update.my_chat_member: + update_type = "my_chat_member" + event = update.my_chat_member + elif update.chat_member: + update_type = "chat_member" + event = update.chat_member else: warnings.warn( "Detected unknown update type.\n" diff --git a/aiogram/dispatcher/filters/__init__.py b/aiogram/dispatcher/filters/__init__.py index 1452d0a3..a0456429 100644 --- a/aiogram/dispatcher/filters/__init__.py +++ b/aiogram/dispatcher/filters/__init__.py @@ -29,5 +29,7 @@ BUILTIN_FILTERS: Dict[str, Tuple[Type[BaseFilter], ...]] = { "pre_checkout_query": (), "poll": (), "poll_answer": (), + "my_chat_member": (), + "chat_member": (), "error": (ExceptionMessageFilter, ExceptionTypeFilter), } diff --git a/aiogram/dispatcher/filters/content_types.py b/aiogram/dispatcher/filters/content_types.py index 640a8b64..177ecdae 100644 --- a/aiogram/dispatcher/filters/content_types.py +++ b/aiogram/dispatcher/filters/content_types.py @@ -22,7 +22,7 @@ class ContentTypesFilter(BaseFilter): cls, value: Optional[Union[Sequence[str], str]] ) -> Optional[Sequence[str]]: if not value: - value = [ContentType.TEXT] + return value if isinstance(value, str): value = [value] allowed_content_types = set(ContentType.all()) diff --git a/aiogram/dispatcher/handler/__init__.py b/aiogram/dispatcher/handler/__init__.py index b2c5c9ef..ee6ccc98 100644 --- a/aiogram/dispatcher/handler/__init__.py +++ b/aiogram/dispatcher/handler/__init__.py @@ -7,11 +7,13 @@ from .message import MessageHandler, MessageHandlerCommandMixin from .poll import PollHandler from .pre_checkout_query import PreCheckoutQueryHandler from .shipping_query import ShippingQueryHandler +from .chat_member import ChatMemberUpdated __all__ = ( "BaseHandler", "BaseHandlerMixin", "CallbackQueryHandler", + "ChatMemberUpdated", "ChosenInlineResultHandler", "ErrorHandler", "InlineQueryHandler", diff --git a/aiogram/dispatcher/router.py b/aiogram/dispatcher/router.py index 3370d3c0..2e659c7e 100644 --- a/aiogram/dispatcher/router.py +++ b/aiogram/dispatcher/router.py @@ -51,6 +51,9 @@ class Router: ) self.poll = TelegramEventObserver(router=self, event_name="poll") self.poll_answer = TelegramEventObserver(router=self, event_name="poll_answer") + self.my_chat_member = TelegramEventObserver(router=self, event_name="my_chat_member") + self.chat_member = TelegramEventObserver(router=self, event_name="chat_member") + self.errors = TelegramEventObserver(router=self, event_name="error") self.startup = EventObserver() @@ -68,6 +71,8 @@ class Router: "pre_checkout_query": self.pre_checkout_query, "poll": self.poll, "poll_answer": self.poll_answer, + "my_chat_member": self.my_chat_member, + "chat_member": self.chat_member, "error": self.errors, } diff --git a/aiogram/methods/__init__.py b/aiogram/methods/__init__.py index 9d498162..df602bef 100644 --- a/aiogram/methods/__init__.py +++ b/aiogram/methods/__init__.py @@ -6,12 +6,14 @@ from .answer_shipping_query import AnswerShippingQuery from .base import Request, Response, TelegramMethod from .close import Close from .copy_message import CopyMessage +from .create_chat_invite_link import CreateChatInviteLink from .create_new_sticker_set import CreateNewStickerSet from .delete_chat_photo import DeleteChatPhoto from .delete_chat_sticker_set import DeleteChatStickerSet from .delete_message import DeleteMessage from .delete_sticker_from_set import DeleteStickerFromSet from .delete_webhook import DeleteWebhook +from .edit_chat_invite_link import EditChatInviteLink from .edit_message_caption import EditMessageCaption from .edit_message_live_location import EditMessageLiveLocation from .edit_message_media import EditMessageMedia @@ -37,6 +39,7 @@ from .log_out import LogOut from .pin_chat_message import PinChatMessage from .promote_chat_member import PromoteChatMember from .restrict_chat_member import RestrictChatMember +from .revoke_chat_invite_link import RevokeChatInviteLink from .send_animation import SendAnimation from .send_audio import SendAudio from .send_chat_action import SendChatAction @@ -113,6 +116,9 @@ __all__ = ( "SetChatAdministratorCustomTitle", "SetChatPermissions", "ExportChatInviteLink", + "CreateChatInviteLink", + "EditChatInviteLink", + "RevokeChatInviteLink", "SetChatPhoto", "DeleteChatPhoto", "SetChatTitle", diff --git a/aiogram/methods/copy_message.py b/aiogram/methods/copy_message.py index dddf2c92..443ac298 100644 --- a/aiogram/methods/copy_message.py +++ b/aiogram/methods/copy_message.py @@ -19,7 +19,7 @@ if TYPE_CHECKING: # pragma: no cover class CopyMessage(TelegramMethod[MessageId]): """ - Use this method to copy messages of any kind. The method is analogous to the method :class:`aiogram.methods.forward_messages.ForwardMessages`, but the copied message doesn't have a link to the original message. Returns the :class:`aiogram.types.message_id.MessageId` of the sent message on success. + Use this method to copy messages of any kind. The method is analogous to the method :class:`aiogram.methods.forward_message.ForwardMessage`, but the copied message doesn't have a link to the original message. Returns the :class:`aiogram.types.message_id.MessageId` of the sent message on success. Source: https://core.telegram.org/bots/api#copymessage """ diff --git a/aiogram/methods/create_chat_invite_link.py b/aiogram/methods/create_chat_invite_link.py new file mode 100644 index 00000000..c476df02 --- /dev/null +++ b/aiogram/methods/create_chat_invite_link.py @@ -0,0 +1,31 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Dict, Optional, Union + +from ..types import ChatInviteLink +from .base import Request, TelegramMethod + +if TYPE_CHECKING: # pragma: no cover + from ..client.bot import Bot + + +class CreateChatInviteLink(TelegramMethod[ChatInviteLink]): + """ + Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. The link can be revoked using the method :class:`aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink`. Returns the new invite link as :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. + + Source: https://core.telegram.org/bots/api#createchatinvitelink + """ + + __returning__ = ChatInviteLink + + chat_id: Union[int, str] + """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" + expire_date: Optional[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""" + + def build_request(self, bot: Bot) -> Request: + data: Dict[str, Any] = self.dict() + + return Request(method="createChatInviteLink", data=data) diff --git a/aiogram/methods/edit_chat_invite_link.py b/aiogram/methods/edit_chat_invite_link.py new file mode 100644 index 00000000..d9380f20 --- /dev/null +++ b/aiogram/methods/edit_chat_invite_link.py @@ -0,0 +1,33 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Dict, Optional, Union + +from ..types import ChatInviteLink +from .base import Request, TelegramMethod + +if TYPE_CHECKING: # pragma: no cover + from ..client.bot import Bot + + +class EditChatInviteLink(TelegramMethod[ChatInviteLink]): + """ + Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns the edited invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. + + Source: https://core.telegram.org/bots/api#editchatinvitelink + """ + + __returning__ = ChatInviteLink + + chat_id: Union[int, str] + """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" + invite_link: str + """The invite link to edit""" + expire_date: Optional[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""" + + def build_request(self, bot: Bot) -> Request: + data: Dict[str, Any] = self.dict() + + return Request(method="editChatInviteLink", data=data) diff --git a/aiogram/methods/export_chat_invite_link.py b/aiogram/methods/export_chat_invite_link.py index 5ee6b6d9..9321b5c6 100644 --- a/aiogram/methods/export_chat_invite_link.py +++ b/aiogram/methods/export_chat_invite_link.py @@ -10,9 +10,9 @@ if TYPE_CHECKING: # pragma: no cover class ExportChatInviteLink(TelegramMethod[str]): """ - Use this method to generate a new invite link for a chat; any previously generated link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns the new invite link as *String* on success. + Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns the new invite link as *String* on success. - Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` — after this the link will become available to the bot via the :class:`aiogram.methods.get_chat.GetChat` method. If your bot needs to generate a new invite link replacing its previous one, use :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` again. + Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` or by calling the :class:`aiogram.methods.get_chat.GetChat` method. If your bot needs to generate a new primary invite link replacing its previous one, use :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` again. Source: https://core.telegram.org/bots/api#exportchatinvitelink """ diff --git a/aiogram/methods/get_updates.py b/aiogram/methods/get_updates.py index e47dcbd9..e5c99378 100644 --- a/aiogram/methods/get_updates.py +++ b/aiogram/methods/get_updates.py @@ -31,7 +31,7 @@ class GetUpdates(TelegramMethod[List[Update]]): timeout: Optional[int] = None """Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only.""" allowed_updates: Optional[List[str]] = None - """A JSON-serialized list of the update types you want your bot to receive. For example, specify ['message', 'edited_channel_post', 'callback_query'] to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all updates regardless of type (default). If not specified, the previous setting will be used.""" + """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.""" def build_request(self, bot: Bot) -> Request: data: Dict[str, Any] = self.dict() diff --git a/aiogram/methods/kick_chat_member.py b/aiogram/methods/kick_chat_member.py index 1c18497e..11ed6bba 100644 --- a/aiogram/methods/kick_chat_member.py +++ b/aiogram/methods/kick_chat_member.py @@ -24,6 +24,8 @@ class KickChatMember(TelegramMethod[bool]): """Unique identifier of the target user""" until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None """Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.""" + revoke_messages: Optional[bool] = None + """Pass :code:`True` to delete all messages from the chat for the user that is being removed. If :code:`False`, the user will be able to see messages in the group that were sent before the user was removed. Always :code:`True` for supergroups and channels.""" def build_request(self, bot: Bot) -> Request: data: Dict[str, Any] = self.dict() diff --git a/aiogram/methods/promote_chat_member.py b/aiogram/methods/promote_chat_member.py index 335dd522..236d3283 100644 --- a/aiogram/methods/promote_chat_member.py +++ b/aiogram/methods/promote_chat_member.py @@ -23,22 +23,26 @@ class PromoteChatMember(TelegramMethod[bool]): """Unique identifier of the target user""" is_anonymous: Optional[bool] = None """Pass :code:`True`, if the administrator's presence in the chat is hidden""" - can_change_info: Optional[bool] = None - """Pass True, if the administrator can change chat title, photo and other settings""" + can_manage_chat: Optional[bool] = None + """Pass True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege""" can_post_messages: Optional[bool] = None """Pass True, if the administrator can create channel posts, channels only""" can_edit_messages: Optional[bool] = None """Pass True, if the administrator can edit messages of other users and can pin messages, channels only""" can_delete_messages: Optional[bool] = None """Pass True, if the administrator can delete messages of other users""" - can_invite_users: Optional[bool] = None - """Pass True, if the administrator can invite new users to the chat""" + can_manage_voice_chats: Optional[bool] = None + """Pass True, if the administrator can manage voice chats, supergroups only""" can_restrict_members: Optional[bool] = None """Pass True, if the administrator can restrict, ban or unban chat members""" - can_pin_messages: Optional[bool] = None - """Pass True, if the administrator can pin messages, supergroups only""" can_promote_members: Optional[bool] = None """Pass True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)""" + can_change_info: Optional[bool] = None + """Pass True, if the administrator can change chat title, photo and other settings""" + can_invite_users: Optional[bool] = None + """Pass True, if the administrator can invite new users to the chat""" + can_pin_messages: Optional[bool] = None + """Pass True, if the administrator can pin messages, supergroups only""" def build_request(self, bot: Bot) -> Request: data: Dict[str, Any] = self.dict() diff --git a/aiogram/methods/revoke_chat_invite_link.py b/aiogram/methods/revoke_chat_invite_link.py new file mode 100644 index 00000000..ee684f6d --- /dev/null +++ b/aiogram/methods/revoke_chat_invite_link.py @@ -0,0 +1,29 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Dict, Union + +from ..types import ChatInviteLink +from .base import Request, TelegramMethod + +if TYPE_CHECKING: # pragma: no cover + from ..client.bot import Bot + + +class RevokeChatInviteLink(TelegramMethod[ChatInviteLink]): + """ + Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns the revoked invite link as :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. + + Source: https://core.telegram.org/bots/api#revokechatinvitelink + """ + + __returning__ = ChatInviteLink + + chat_id: Union[int, str] + """Unique identifier of the target chat or username of the target channel (in the format :code:`@channelusername`)""" + invite_link: str + """The invite link to revoke""" + + def build_request(self, bot: Bot) -> Request: + data: Dict[str, Any] = self.dict() + + return Request(method="revokeChatInviteLink", data=data) diff --git a/aiogram/methods/send_dice.py b/aiogram/methods/send_dice.py index ca8e0c12..65b148cd 100644 --- a/aiogram/methods/send_dice.py +++ b/aiogram/methods/send_dice.py @@ -27,7 +27,7 @@ class SendDice(TelegramMethod[Message]): chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" emoji: Optional[str] = None - """Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '⚽', or '🎰'. Dice can have values 1-6 for '🎲' and '🎯', values 1-5 for '🏀' and '⚽', and values 1-64 for '🎰'. Defaults to '🎲'""" + """Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '⚽', '🎳', or '🎰'. Dice can have values 1-6 for '🎲', '🎯' and '🎳', values 1-5 for '🏀' and '⚽', and values 1-64 for '🎰'. Defaults to '🎲'""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" reply_to_message_id: Optional[int] = None diff --git a/aiogram/methods/set_webhook.py b/aiogram/methods/set_webhook.py index fc7539c4..1c1ffd13 100644 --- a/aiogram/methods/set_webhook.py +++ b/aiogram/methods/set_webhook.py @@ -37,7 +37,7 @@ class SetWebhook(TelegramMethod[bool]): max_connections: Optional[int] = None """Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to *40*. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput.""" allowed_updates: Optional[List[str]] = None - """A JSON-serialized list of the update types you want your bot to receive. For example, specify ['message', 'edited_channel_post', 'callback_query'] to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all updates regardless of type (default). If not specified, the previous setting will be used.""" + """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""" diff --git a/aiogram/types/__init__.py b/aiogram/types/__init__.py index 3a6141d9..99944532 100644 --- a/aiogram/types/__init__.py +++ b/aiogram/types/__init__.py @@ -5,8 +5,10 @@ from .bot_command import BotCommand from .callback_game import CallbackGame from .callback_query import CallbackQuery from .chat import Chat +from .chat_invite_link import ChatInviteLink from .chat_location import ChatLocation from .chat_member import ChatMember +from .chat_member_updated import ChatMemberUpdated from .chat_permissions import ChatPermissions from .chat_photo import ChatPhoto from .chosen_inline_result import ChosenInlineResult @@ -64,6 +66,7 @@ from .location import Location from .login_url import LoginUrl from .mask_position import MaskPosition from .message import ContentType, Message +from .message_auto_delete_timer_changed import MessageAutoDeleteTimerChanged from .message_entity import MessageEntity from .message_id import MessageId from .order_info import OrderInfo @@ -101,6 +104,9 @@ from .venue import Venue from .video import Video from .video_note import VideoNote from .voice import Voice +from .voice_chat_ended import VoiceChatEnded +from .voice_chat_participants_invited import VoiceChatParticipantsInvited +from .voice_chat_started import VoiceChatStarted from .webhook_info import WebhookInfo __all__ = ( @@ -133,6 +139,10 @@ __all__ = ( "Location", "Venue", "ProximityAlertTriggered", + "MessageAutoDeleteTimerChanged", + "VoiceChatStarted", + "VoiceChatEnded", + "VoiceChatParticipantsInvited", "UserProfilePhotos", "File", "ReplyKeyboardMarkup", @@ -145,7 +155,9 @@ __all__ = ( "CallbackQuery", "ForceReply", "ChatPhoto", + "ChatInviteLink", "ChatMember", + "ChatMemberUpdated", "ChatPermissions", "ChatLocation", "BotCommand", diff --git a/aiogram/types/chat.py b/aiogram/types/chat.py index 8714ceb8..7d735ac3 100644 --- a/aiogram/types/chat.py +++ b/aiogram/types/chat.py @@ -19,7 +19,7 @@ class Chat(TelegramObject): """ id: int - """Unique identifier for this chat. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.""" + """Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.""" type: str """Type of chat, can be either 'private', 'group', 'supergroup' or 'channel'""" title: Optional[str] = None @@ -37,13 +37,15 @@ class Chat(TelegramObject): description: Optional[str] = None """*Optional*. Description, for groups, supergroups and channel chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" invite_link: Optional[str] = None - """*Optional*. Chat invite link, for groups, supergroups and channel chats. Each administrator in a chat generates their own invite links, so the bot must first generate the link using :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink`. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" + """*Optional*. Primary invite link, for groups, supergroups and channel chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" pinned_message: Optional[Message] = None """*Optional*. The most recent pinned message (by sending date). Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" permissions: Optional[ChatPermissions] = None """*Optional*. Default chat member permissions, for groups and supergroups. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" slow_mode_delay: Optional[int] = None """*Optional*. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" + message_auto_delete_time: Optional[int] = None + """*Optional*. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" 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 new file mode 100644 index 00000000..4d39a116 --- /dev/null +++ b/aiogram/types/chat_invite_link.py @@ -0,0 +1,29 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Optional + +from .base import TelegramObject + +if TYPE_CHECKING: # pragma: no cover + from .user import User + + +class ChatInviteLink(TelegramObject): + """ + Represents an invite link for a chat. + + Source: https://core.telegram.org/bots/api#chatinvitelink + """ + + invite_link: str + """The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with '…'.""" + creator: User + """Creator of the link""" + is_primary: bool + """True, if the link is primary""" + is_revoked: bool + """True, if the link is revoked""" + expire_date: Optional[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""" diff --git a/aiogram/types/chat_member.py b/aiogram/types/chat_member.py index aa1809aa..4a1abc8b 100644 --- a/aiogram/types/chat_member.py +++ b/aiogram/types/chat_member.py @@ -28,12 +28,16 @@ class ChatMember(TelegramObject): """*Optional*. Owner and administrators only. True, if the user's presence in the chat is hidden""" can_be_edited: Optional[bool] = None """*Optional*. Administrators only. True, if the bot is allowed to edit administrator privileges of that user""" + can_manage_chat: Optional[bool] = None + """*Optional*. Administrators only. True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege""" can_post_messages: Optional[bool] = None """*Optional*. Administrators only. True, if the administrator can post in the channel; channels only""" can_edit_messages: Optional[bool] = None """*Optional*. Administrators only. True, if the administrator can edit messages of other users and can pin messages; channels only""" can_delete_messages: Optional[bool] = None """*Optional*. Administrators only. True, if the administrator can delete messages of other users""" + can_manage_voice_chats: Optional[bool] = None + """*Optional*. Administrators only. True, if the administrator can manage voice chats""" can_restrict_members: Optional[bool] = None """*Optional*. Administrators only. True, if the administrator can restrict, ban or unban chat members""" can_promote_members: Optional[bool] = None @@ -58,7 +62,6 @@ class ChatMember(TelegramObject): """*Optional*. Restricted only. True, if the user is allowed to add web page previews to their messages""" until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None """*Optional*. Restricted and kicked only. Date when restrictions will be lifted for this user; unix time""" - """Restricted and kicked only. Date when restrictions will be lifted for this user; unix time""" @property def is_chat_admin(self) -> bool: diff --git a/aiogram/types/chat_member_updated.py b/aiogram/types/chat_member_updated.py new file mode 100644 index 00000000..e14a9e88 --- /dev/null +++ b/aiogram/types/chat_member_updated.py @@ -0,0 +1,35 @@ +from __future__ import annotations + +import datetime +from typing import TYPE_CHECKING, Optional + +from pydantic import Field + +from .base import TelegramObject + +if TYPE_CHECKING: # pragma: no cover + from .chat import Chat + from .chat_invite_link import ChatInviteLink + from .chat_member import ChatMember + from .user import User + + +class ChatMemberUpdated(TelegramObject): + """ + This object represents changes in the status of a chat member. + + Source: https://core.telegram.org/bots/api#chatmemberupdated + """ + + chat: Chat + """Chat the user belongs to""" + from_user: User = Field(..., alias="from") + """Performer of the action, which resulted in the change""" + date: datetime.datetime + """Date the change was done in Unix time""" + old_chat_member: ChatMember + """Previous information about the chat member""" + new_chat_member: ChatMember + """New information about the chat member""" + invite_link: Optional[ChatInviteLink] = None + """*Optional*. Chat invite link, which was used by the user to join the chat; for joining by invite link events only.""" diff --git a/aiogram/types/contact.py b/aiogram/types/contact.py index 951a5b8f..732b770d 100644 --- a/aiogram/types/contact.py +++ b/aiogram/types/contact.py @@ -19,6 +19,6 @@ class Contact(TelegramObject): last_name: Optional[str] = None """*Optional*. Contact's last name""" user_id: Optional[int] = None - """*Optional*. Contact's user identifier in Telegram""" + """*Optional*. Contact's user identifier in Telegram. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.""" vcard: Optional[str] = None """*Optional*. Additional data about the contact in the form of a `vCard `_""" diff --git a/aiogram/types/dice.py b/aiogram/types/dice.py index cc5720d8..00356457 100644 --- a/aiogram/types/dice.py +++ b/aiogram/types/dice.py @@ -13,7 +13,7 @@ class Dice(TelegramObject): emoji: str """Emoji on which the dice throw animation is based""" value: int - """Value of the dice, 1-6 for '🎲' and '🎯' base emoji, 1-5 for '🏀' and '⚽' base emoji, 1-64 for '🎰' base emoji""" + """Value of the dice, 1-6 for '🎲', '🎯' and '🎳' base emoji, 1-5 for '🏀' and '⚽' base emoji, 1-64 for '🎰' base emoji""" class DiceEmoji: @@ -22,3 +22,4 @@ class DiceEmoji: BASKETBALL = "🏀" FOOTBALL = "⚽" SLOT_MACHINE = "🎰" + BOWLING = "🎳" diff --git a/aiogram/types/inline_query_result.py b/aiogram/types/inline_query_result.py index a8a66403..246552b3 100644 --- a/aiogram/types/inline_query_result.py +++ b/aiogram/types/inline_query_result.py @@ -28,5 +28,7 @@ class InlineQueryResult(MutableTelegramObject): - :class:`aiogram.types.inline_query_result_video.InlineQueryResultVideo` - :class:`aiogram.types.inline_query_result_voice.InlineQueryResultVoice` + **Note:** All URLs passed in inline query results will be available to end users and therefore must be assumed to be public. + Source: https://core.telegram.org/bots/api#inlinequeryresult """ diff --git a/aiogram/types/message.py b/aiogram/types/message.py index 063f0521..acc9809b 100644 --- a/aiogram/types/message.py +++ b/aiogram/types/message.py @@ -11,6 +11,7 @@ from .base import UNSET, TelegramObject if TYPE_CHECKING: # pragma: no cover from ..methods import ( + CopyMessage, SendAnimation, SendAudio, SendContact, @@ -44,6 +45,7 @@ if TYPE_CHECKING: # pragma: no cover from .invoice import Invoice from .labeled_price import LabeledPrice from .location import Location + from .message_auto_delete_timer_changed import MessageAutoDeleteTimerChanged from .message_entity import MessageEntity from .passport_data import PassportData from .photo_size import PhotoSize @@ -58,6 +60,9 @@ if TYPE_CHECKING: # pragma: no cover from .video import Video from .video_note import VideoNote from .voice import Voice + from .voice_chat_ended import VoiceChatEnded + from .voice_chat_participants_invited import VoiceChatParticipantsInvited + from .voice_chat_started import VoiceChatStarted class Message(TelegramObject): @@ -151,10 +156,12 @@ class Message(TelegramObject): """*Optional*. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.""" channel_chat_created: Optional[bool] = None """*Optional*. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.""" + message_auto_delete_timer_changed: Optional[MessageAutoDeleteTimerChanged] = None + """*Optional*. Service message: auto-delete timer settings changed in the chat""" migrate_to_chat_id: Optional[int] = None - """*Optional*. The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.""" + """*Optional*. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.""" migrate_from_chat_id: Optional[int] = None - """*Optional*. The supergroup has been migrated from a group with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.""" + """*Optional*. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.""" pinned_message: Optional[Message] = None """*Optional*. Specified message was pinned. Note that the Message object in this field will not contain further *reply_to_message* fields even if it is itself a reply.""" invoice: Optional[Invoice] = None @@ -167,6 +174,12 @@ class Message(TelegramObject): """*Optional*. Telegram Passport data""" proximity_alert_triggered: Optional[ProximityAlertTriggered] = None """*Optional*. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.""" + voice_chat_started: Optional[VoiceChatStarted] = None + """*Optional*. Service message: voice chat started""" + voice_chat_ended: Optional[VoiceChatEnded] = None + """*Optional*. Service message: voice chat ended""" + voice_chat_participants_invited: Optional[VoiceChatParticipantsInvited] = None + """*Optional*. Service message: new participants invited to a voice chat""" reply_markup: Optional[InlineKeyboardMarkup] = None """*Optional*. Inline keyboard attached to the message. :code:`login_url` buttons are represented as ordinary :code:`url` buttons.""" @@ -228,6 +241,14 @@ class Message(TelegramObject): return ContentType.POLL if self.dice: return ContentType.DICE + if self.message_auto_delete_timer_changed: + return ContentType.MESSAGE_AUTO_DELETE_TIMER_CHANGED + if self.voice_chat_started: + return ContentType.VOICE_CHAT_STARTED + if self.voice_chat_ended: + return ContentType.VOICE_CHAT_ENDED + if self.voice_chat_participants_invited: + return ContentType.VOICE_CHAT_PARTICIPANTS_INVITED return ContentType.UNKNOWN @@ -1517,6 +1538,179 @@ class Message(TelegramObject): reply_markup=reply_markup, ) + def send_copy( + self: Message, + chat_id: Union[str, int], + disable_notification: Optional[bool] = None, + reply_to_message_id: Optional[int] = None, + reply_markup: Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, None] = None, + ) -> Union[ + SendAnimation, + SendAudio, + SendContact, + SendDocument, + SendLocation, + SendMessage, + SendPhoto, + SendPoll, + SendDice, + SendSticker, + SendVenue, + SendVideo, + SendVideoNote, + SendVoice, + ]: + """ + Send copy of message. + + Is similar to :meth:`aiogram.client.bot.Bot.copy_message` + but returning the sent message instead of :class:`aiogram.types.message_id.MessageId` + + .. note:: + + This method don't use the API method named `copyMessage` and + historically implemented before the similar method is added to API + + :param chat_id: + :param disable_notification: + :param reply_to_message_id: + :param reply_markup: + :return: + """ + from ..methods import ( + SendAnimation, + SendAudio, + SendContact, + SendDice, + SendDocument, + SendLocation, + SendMessage, + SendPhoto, + SendPoll, + SendSticker, + SendVenue, + SendVideo, + SendVideoNote, + SendVoice, + ) + + kwargs = { + "chat_id": chat_id, + "reply_markup": reply_markup or self.reply_markup, + "disable_notification": disable_notification, + "reply_to_message_id": reply_to_message_id, + } + text = self.text or self.caption + entities = self.entities or self.caption_entities + + if self.text: + return SendMessage(text=text, entities=entities, **kwargs) + elif self.audio: + return SendAudio( + audio=self.audio.file_id, + caption=text, + title=self.audio.title, + performer=self.audio.performer, + duration=self.audio.duration, + caption_entities=entities, + **kwargs, + ) + elif self.animation: + return SendAnimation( + animation=self.animation.file_id, caption=text, caption_entities=entities, **kwargs + ) + elif self.document: + return SendDocument( + document=self.document.file_id, caption=text, caption_entities=entities, **kwargs + ) + elif self.photo: + return SendPhoto( + photo=self.photo[-1].file_id, caption=text, caption_entities=entities, **kwargs + ) + elif self.sticker: + return SendSticker(sticker=self.sticker.file_id, **kwargs) + elif self.video: + return SendVideo( + video=self.video.file_id, caption=text, caption_entities=entities, **kwargs + ) + elif self.video_note: + return SendVideoNote(video_note=self.video_note.file_id, **kwargs) + elif self.voice: + return SendVoice(voice=self.voice.file_id, **kwargs) + elif self.contact: + return SendContact( + phone_number=self.contact.phone_number, + first_name=self.contact.first_name, + last_name=self.contact.last_name, + vcard=self.contact.vcard, + **kwargs, + ) + elif self.venue: + return SendVenue( + latitude=self.venue.location.latitude, + longitude=self.venue.location.longitude, + title=self.venue.title, + address=self.venue.address, + foursquare_id=self.venue.foursquare_id, + foursquare_type=self.venue.foursquare_type, + **kwargs, + ) + elif self.location: + return SendLocation( + latitude=self.location.latitude, longitude=self.location.longitude, **kwargs + ) + elif self.poll: + return SendPoll( + question=self.poll.question, + options=[option.text for option in self.poll.options], + **kwargs, + ) + elif self.dice: # Dice value can't be controlled + return SendDice(**kwargs) + else: + raise TypeError("This type of message can't be copied.") + + async def copy_to( + self, + chat_id: Union[int, str], + caption: Optional[str] = None, + parse_mode: Optional[str] = None, + caption_entities: Optional[List[MessageEntity]] = None, + disable_notification: Optional[bool] = None, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[ + Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] + ] = None, + ) -> CopyMessage: + """ + Copy message + + :param chat_id: + :param caption: + :param parse_mode: + :param caption_entities: + :param disable_notification: + :param reply_to_message_id: + :param allow_sending_without_reply: + :param reply_markup: + :return: + """ + from ..methods import CopyMessage + + return CopyMessage( + chat_id=chat_id, + from_chat_id=self.chat.id, + message_id=self.message_id, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + disable_notification=disable_notification, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, + ) + class ContentType(helper.Helper): mode = helper.HelperMode.snake_case @@ -1549,6 +1743,10 @@ class ContentType(helper.Helper): PASSPORT_DATA = helper.Item() # passport_data POLL = helper.Item() # poll DICE = helper.Item() # dice + MESSAGE_AUTO_DELETE_TIMER_CHANGED = helper.Item() # message_auto_delete_timer_changed + VOICE_CHAT_STARTED = helper.Item() # voice_chat_started + VOICE_CHAT_ENDED = helper.Item() # voice_chat_ended + VOICE_CHAT_PARTICIPANTS_INVITED = helper.Item() # voice_chat_participants_invited UNKNOWN = helper.Item() # unknown ANY = helper.Item() # any diff --git a/aiogram/types/message_auto_delete_timer_changed.py b/aiogram/types/message_auto_delete_timer_changed.py new file mode 100644 index 00000000..ab62baab --- /dev/null +++ b/aiogram/types/message_auto_delete_timer_changed.py @@ -0,0 +1,19 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING + +from .base import TelegramObject + +if TYPE_CHECKING: # pragma: no cover + pass + + +class MessageAutoDeleteTimerChanged(TelegramObject): + """ + This object represents a service message about a change in auto-delete timer settings. + + Source: https://core.telegram.org/bots/api#messageautodeletetimerchanged + """ + + message_auto_delete_time: int + """New auto-delete time for messages in the chat""" diff --git a/aiogram/types/response_parameters.py b/aiogram/types/response_parameters.py index 8bfb3cf5..5c722c9e 100644 --- a/aiogram/types/response_parameters.py +++ b/aiogram/types/response_parameters.py @@ -13,6 +13,6 @@ class ResponseParameters(TelegramObject): """ migrate_to_chat_id: Optional[int] = None - """*Optional*. The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.""" + """*Optional*. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.""" retry_after: Optional[int] = None """*Optional*. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated""" diff --git a/aiogram/types/update.py b/aiogram/types/update.py index 625fce4a..3e43a316 100644 --- a/aiogram/types/update.py +++ b/aiogram/types/update.py @@ -6,6 +6,7 @@ from .base import TelegramObject if TYPE_CHECKING: # pragma: no cover from .callback_query import CallbackQuery + from .chat_member_updated import ChatMemberUpdated from .chosen_inline_result import ChosenInlineResult from .inline_query import InlineQuery from .message import Message @@ -48,3 +49,7 @@ class Update(TelegramObject): """*Optional*. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot""" poll_answer: Optional[PollAnswer] = None """*Optional*. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.""" + my_chat_member: Optional[ChatMemberUpdated] = None + """*Optional*. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user.""" + chat_member: Optional[ChatMemberUpdated] = None + """*Optional*. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify 'chat_member' in the list of *allowed_updates* to receive these updates.""" diff --git a/aiogram/types/user.py b/aiogram/types/user.py index 7f687e17..4d65ce71 100644 --- a/aiogram/types/user.py +++ b/aiogram/types/user.py @@ -13,7 +13,7 @@ class User(TelegramObject): """ id: int - """Unique identifier for this user or bot""" + """Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.""" is_bot: bool """True, if this user is a bot""" first_name: str diff --git a/aiogram/types/voice_chat_ended.py b/aiogram/types/voice_chat_ended.py new file mode 100644 index 00000000..cd8290d8 --- /dev/null +++ b/aiogram/types/voice_chat_ended.py @@ -0,0 +1,19 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING + +from .base import TelegramObject + +if TYPE_CHECKING: # pragma: no cover + pass + + +class VoiceChatEnded(TelegramObject): + """ + This object represents a service message about a voice chat ended in the chat. + + Source: https://core.telegram.org/bots/api#voicechatended + """ + + duration: int + """Voice chat duration; in seconds""" diff --git a/aiogram/types/voice_chat_participants_invited.py b/aiogram/types/voice_chat_participants_invited.py new file mode 100644 index 00000000..191b414f --- /dev/null +++ b/aiogram/types/voice_chat_participants_invited.py @@ -0,0 +1,19 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, List, Optional + +from .base import TelegramObject + +if TYPE_CHECKING: # pragma: no cover + from .user import User + + +class VoiceChatParticipantsInvited(TelegramObject): + """ + This object represents a service message about new members invited to a voice chat. + + Source: https://core.telegram.org/bots/api#voicechatparticipantsinvited + """ + + users: Optional[List[User]] = None + """*Optional*. New members that were invited to the voice chat""" diff --git a/aiogram/types/voice_chat_started.py b/aiogram/types/voice_chat_started.py new file mode 100644 index 00000000..68b72cf3 --- /dev/null +++ b/aiogram/types/voice_chat_started.py @@ -0,0 +1,16 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING + +from .base import TelegramObject + +if TYPE_CHECKING: # pragma: no cover + pass + + +class VoiceChatStarted(TelegramObject): + """ + This object represents a service message about a voice chat started in the chat. Currently holds no information. + + Source: https://core.telegram.org/bots/api#voicechatstarted + """ diff --git a/aiogram/types/webhook_info.py b/aiogram/types/webhook_info.py index 24a9844e..b6f4747d 100644 --- a/aiogram/types/webhook_info.py +++ b/aiogram/types/webhook_info.py @@ -27,4 +27,4 @@ class WebhookInfo(TelegramObject): max_connections: Optional[int] = None """*Optional*. Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery""" allowed_updates: Optional[List[str]] = None - """*Optional*. A list of update types the bot is subscribed to. Defaults to all update types""" + """*Optional*. A list of update types the bot is subscribed to. Defaults to all update types except *chat_member*""" diff --git a/docs/_api_version.md b/docs/_api_version.md index 86a9588a..a75b92f1 100644 --- a/docs/_api_version.md +++ b/docs/_api_version.md @@ -1 +1 @@ -4.9 +5.1 diff --git a/docs/_package_version.md b/docs/_package_version.md index d8cad509..d2cc0e7f 100644 --- a/docs/_package_version.md +++ b/docs/_package_version.md @@ -1 +1 @@ -3.0.0a6 +3.0.0a7 diff --git a/docs2/api/methods/add_sticker_to_set.rst b/docs2/api/methods/add_sticker_to_set.rst index 32cec35c..68d1cbc6 100644 --- a/docs2/api/methods/add_sticker_to_set.rst +++ b/docs2/api/methods/add_sticker_to_set.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return AddStickerToSet(...) \ No newline at end of file + return AddStickerToSet(...) diff --git a/docs2/api/methods/answer_callback_query.rst b/docs2/api/methods/answer_callback_query.rst index f0afd844..1ffad5f5 100644 --- a/docs2/api/methods/answer_callback_query.rst +++ b/docs2/api/methods/answer_callback_query.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return AnswerCallbackQuery(...) \ No newline at end of file + return AnswerCallbackQuery(...) diff --git a/docs2/api/methods/answer_inline_query.rst b/docs2/api/methods/answer_inline_query.rst index 8998eb53..a2231c5b 100644 --- a/docs2/api/methods/answer_inline_query.rst +++ b/docs2/api/methods/answer_inline_query.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return AnswerInlineQuery(...) \ No newline at end of file + return AnswerInlineQuery(...) diff --git a/docs2/api/methods/answer_pre_checkout_query.rst b/docs2/api/methods/answer_pre_checkout_query.rst index d3e3c6f0..c332f6e6 100644 --- a/docs2/api/methods/answer_pre_checkout_query.rst +++ b/docs2/api/methods/answer_pre_checkout_query.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return AnswerPreCheckoutQuery(...) \ No newline at end of file + return AnswerPreCheckoutQuery(...) diff --git a/docs2/api/methods/answer_shipping_query.rst b/docs2/api/methods/answer_shipping_query.rst index 14689178..2b3f5212 100644 --- a/docs2/api/methods/answer_shipping_query.rst +++ b/docs2/api/methods/answer_shipping_query.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return AnswerShippingQuery(...) \ No newline at end of file + return AnswerShippingQuery(...) diff --git a/docs2/api/methods/close.rst b/docs2/api/methods/close.rst index 8daec78d..2ae15875 100644 --- a/docs2/api/methods/close.rst +++ b/docs2/api/methods/close.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return Close(...) \ No newline at end of file + return Close(...) diff --git a/docs2/api/methods/copy_message.rst b/docs2/api/methods/copy_message.rst index 44406c3a..a4f5c9b9 100644 --- a/docs2/api/methods/copy_message.rst +++ b/docs2/api/methods/copy_message.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return CopyMessage(...) \ No newline at end of file + return CopyMessage(...) diff --git a/docs2/api/methods/create_chat_invite_link.rst b/docs2/api/methods/create_chat_invite_link.rst new file mode 100644 index 00000000..787eded8 --- /dev/null +++ b/docs2/api/methods/create_chat_invite_link.rst @@ -0,0 +1,51 @@ +#################### +createChatInviteLink +#################### + +Returns: :obj:`ChatInviteLink` + +.. automodule:: aiogram.methods.create_chat_invite_link + :members: + :member-order: bysource + :undoc-members: True + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: ChatInviteLink = await bot.create_chat_invite_link(...) + + +Method as object +---------------- + +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 +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: ChatInviteLink = await bot(CreateChatInviteLink(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return CreateChatInviteLink(...) diff --git a/docs2/api/methods/create_new_sticker_set.rst b/docs2/api/methods/create_new_sticker_set.rst index 230f49fe..475c1c01 100644 --- a/docs2/api/methods/create_new_sticker_set.rst +++ b/docs2/api/methods/create_new_sticker_set.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return CreateNewStickerSet(...) \ No newline at end of file + return CreateNewStickerSet(...) diff --git a/docs2/api/methods/delete_chat_photo.rst b/docs2/api/methods/delete_chat_photo.rst index 01280b60..637cef64 100644 --- a/docs2/api/methods/delete_chat_photo.rst +++ b/docs2/api/methods/delete_chat_photo.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return DeleteChatPhoto(...) \ No newline at end of file + return DeleteChatPhoto(...) diff --git a/docs2/api/methods/delete_chat_sticker_set.rst b/docs2/api/methods/delete_chat_sticker_set.rst index 67a9eef0..a06cc894 100644 --- a/docs2/api/methods/delete_chat_sticker_set.rst +++ b/docs2/api/methods/delete_chat_sticker_set.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return DeleteChatStickerSet(...) \ No newline at end of file + return DeleteChatStickerSet(...) diff --git a/docs2/api/methods/delete_message.rst b/docs2/api/methods/delete_message.rst index b97f5c41..96b721e9 100644 --- a/docs2/api/methods/delete_message.rst +++ b/docs2/api/methods/delete_message.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return DeleteMessage(...) \ No newline at end of file + return DeleteMessage(...) diff --git a/docs2/api/methods/delete_sticker_from_set.rst b/docs2/api/methods/delete_sticker_from_set.rst index dfb57a0a..ac491710 100644 --- a/docs2/api/methods/delete_sticker_from_set.rst +++ b/docs2/api/methods/delete_sticker_from_set.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return DeleteStickerFromSet(...) \ No newline at end of file + return DeleteStickerFromSet(...) diff --git a/docs2/api/methods/delete_webhook.rst b/docs2/api/methods/delete_webhook.rst index 1c7e7d6e..b1f4d02c 100644 --- a/docs2/api/methods/delete_webhook.rst +++ b/docs2/api/methods/delete_webhook.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return DeleteWebhook(...) \ No newline at end of file + return DeleteWebhook(...) diff --git a/docs2/api/methods/edit_chat_invite_link.rst b/docs2/api/methods/edit_chat_invite_link.rst new file mode 100644 index 00000000..a9702e84 --- /dev/null +++ b/docs2/api/methods/edit_chat_invite_link.rst @@ -0,0 +1,51 @@ +################## +editChatInviteLink +################## + +Returns: :obj:`ChatInviteLink` + +.. automodule:: aiogram.methods.edit_chat_invite_link + :members: + :member-order: bysource + :undoc-members: True + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: ChatInviteLink = await bot.edit_chat_invite_link(...) + + +Method as object +---------------- + +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 +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: ChatInviteLink = await bot(EditChatInviteLink(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return EditChatInviteLink(...) diff --git a/docs2/api/methods/edit_message_caption.rst b/docs2/api/methods/edit_message_caption.rst index d05a83b8..fb8a001a 100644 --- a/docs2/api/methods/edit_message_caption.rst +++ b/docs2/api/methods/edit_message_caption.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return EditMessageCaption(...) \ No newline at end of file + return EditMessageCaption(...) diff --git a/docs2/api/methods/edit_message_live_location.rst b/docs2/api/methods/edit_message_live_location.rst index 5516727c..85022f03 100644 --- a/docs2/api/methods/edit_message_live_location.rst +++ b/docs2/api/methods/edit_message_live_location.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return EditMessageLiveLocation(...) \ No newline at end of file + return EditMessageLiveLocation(...) diff --git a/docs2/api/methods/edit_message_media.rst b/docs2/api/methods/edit_message_media.rst index 057d1d5c..5e77467f 100644 --- a/docs2/api/methods/edit_message_media.rst +++ b/docs2/api/methods/edit_message_media.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return EditMessageMedia(...) \ No newline at end of file + return EditMessageMedia(...) diff --git a/docs2/api/methods/edit_message_reply_markup.rst b/docs2/api/methods/edit_message_reply_markup.rst index d37d9400..34916d42 100644 --- a/docs2/api/methods/edit_message_reply_markup.rst +++ b/docs2/api/methods/edit_message_reply_markup.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return EditMessageReplyMarkup(...) \ No newline at end of file + return EditMessageReplyMarkup(...) diff --git a/docs2/api/methods/edit_message_text.rst b/docs2/api/methods/edit_message_text.rst index 55cd428c..32645b94 100644 --- a/docs2/api/methods/edit_message_text.rst +++ b/docs2/api/methods/edit_message_text.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return EditMessageText(...) \ No newline at end of file + return EditMessageText(...) diff --git a/docs2/api/methods/export_chat_invite_link.rst b/docs2/api/methods/export_chat_invite_link.rst index c2cb9c40..ea8c6fcd 100644 --- a/docs2/api/methods/export_chat_invite_link.rst +++ b/docs2/api/methods/export_chat_invite_link.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return ExportChatInviteLink(...) \ No newline at end of file + return ExportChatInviteLink(...) diff --git a/docs2/api/methods/forward_message.rst b/docs2/api/methods/forward_message.rst index b8eace3c..fcf8fd59 100644 --- a/docs2/api/methods/forward_message.rst +++ b/docs2/api/methods/forward_message.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return ForwardMessage(...) \ No newline at end of file + return ForwardMessage(...) diff --git a/docs2/api/methods/get_chat.rst b/docs2/api/methods/get_chat.rst index 9953c616..79124ed2 100644 --- a/docs2/api/methods/get_chat.rst +++ b/docs2/api/methods/get_chat.rst @@ -42,4 +42,3 @@ With specific bot .. code-block:: python result: Chat = await bot(GetChat(...)) - diff --git a/docs2/api/methods/get_chat_administrators.rst b/docs2/api/methods/get_chat_administrators.rst index f5690d73..39bc46ee 100644 --- a/docs2/api/methods/get_chat_administrators.rst +++ b/docs2/api/methods/get_chat_administrators.rst @@ -42,4 +42,3 @@ With specific bot .. code-block:: python result: List[ChatMember] = await bot(GetChatAdministrators(...)) - diff --git a/docs2/api/methods/get_chat_member.rst b/docs2/api/methods/get_chat_member.rst index 53f20f64..0fcf67d3 100644 --- a/docs2/api/methods/get_chat_member.rst +++ b/docs2/api/methods/get_chat_member.rst @@ -42,4 +42,3 @@ With specific bot .. code-block:: python result: ChatMember = await bot(GetChatMember(...)) - diff --git a/docs2/api/methods/get_chat_members_count.rst b/docs2/api/methods/get_chat_members_count.rst index 95030cb7..6286e845 100644 --- a/docs2/api/methods/get_chat_members_count.rst +++ b/docs2/api/methods/get_chat_members_count.rst @@ -42,4 +42,3 @@ With specific bot .. code-block:: python result: int = await bot(GetChatMembersCount(...)) - diff --git a/docs2/api/methods/get_file.rst b/docs2/api/methods/get_file.rst index dfdf4411..ee96326b 100644 --- a/docs2/api/methods/get_file.rst +++ b/docs2/api/methods/get_file.rst @@ -42,4 +42,3 @@ With specific bot .. code-block:: python result: File = await bot(GetFile(...)) - diff --git a/docs2/api/methods/get_game_high_scores.rst b/docs2/api/methods/get_game_high_scores.rst index cb9dc562..4fb1f06e 100644 --- a/docs2/api/methods/get_game_high_scores.rst +++ b/docs2/api/methods/get_game_high_scores.rst @@ -42,4 +42,3 @@ With specific bot .. code-block:: python result: List[GameHighScore] = await bot(GetGameHighScores(...)) - diff --git a/docs2/api/methods/get_me.rst b/docs2/api/methods/get_me.rst index b29e64db..7ae9d580 100644 --- a/docs2/api/methods/get_me.rst +++ b/docs2/api/methods/get_me.rst @@ -42,4 +42,3 @@ With specific bot .. code-block:: python result: User = await bot(GetMe(...)) - diff --git a/docs2/api/methods/get_my_commands.rst b/docs2/api/methods/get_my_commands.rst index 13add8e9..9dba9fe6 100644 --- a/docs2/api/methods/get_my_commands.rst +++ b/docs2/api/methods/get_my_commands.rst @@ -42,4 +42,3 @@ With specific bot .. code-block:: python result: List[BotCommand] = await bot(GetMyCommands(...)) - diff --git a/docs2/api/methods/get_sticker_set.rst b/docs2/api/methods/get_sticker_set.rst index bc3faa93..a1feb38c 100644 --- a/docs2/api/methods/get_sticker_set.rst +++ b/docs2/api/methods/get_sticker_set.rst @@ -42,4 +42,3 @@ With specific bot .. code-block:: python result: StickerSet = await bot(GetStickerSet(...)) - diff --git a/docs2/api/methods/get_updates.rst b/docs2/api/methods/get_updates.rst index 15cae582..6ff33d31 100644 --- a/docs2/api/methods/get_updates.rst +++ b/docs2/api/methods/get_updates.rst @@ -42,4 +42,3 @@ With specific bot .. code-block:: python result: List[Update] = await bot(GetUpdates(...)) - diff --git a/docs2/api/methods/get_user_profile_photos.rst b/docs2/api/methods/get_user_profile_photos.rst index 3b76b9c4..dab76989 100644 --- a/docs2/api/methods/get_user_profile_photos.rst +++ b/docs2/api/methods/get_user_profile_photos.rst @@ -42,4 +42,3 @@ With specific bot .. code-block:: python result: UserProfilePhotos = await bot(GetUserProfilePhotos(...)) - diff --git a/docs2/api/methods/get_webhook_info.rst b/docs2/api/methods/get_webhook_info.rst index 88bc2a46..519e1207 100644 --- a/docs2/api/methods/get_webhook_info.rst +++ b/docs2/api/methods/get_webhook_info.rst @@ -42,4 +42,3 @@ With specific bot .. code-block:: python result: WebhookInfo = await bot(GetWebhookInfo(...)) - diff --git a/docs2/api/methods/index.rst b/docs2/api/methods/index.rst index 728008f4..94c08366 100644 --- a/docs2/api/methods/index.rst +++ b/docs2/api/methods/index.rst @@ -55,6 +55,9 @@ Available methods set_chat_administrator_custom_title set_chat_permissions export_chat_invite_link + create_chat_invite_link + edit_chat_invite_link + revoke_chat_invite_link set_chat_photo delete_chat_photo set_chat_title @@ -136,4 +139,3 @@ Games send_game set_game_score get_game_high_scores - diff --git a/docs2/api/methods/kick_chat_member.rst b/docs2/api/methods/kick_chat_member.rst index 7cf3d70d..da73a535 100644 --- a/docs2/api/methods/kick_chat_member.rst +++ b/docs2/api/methods/kick_chat_member.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return KickChatMember(...) \ No newline at end of file + return KickChatMember(...) diff --git a/docs2/api/methods/leave_chat.rst b/docs2/api/methods/leave_chat.rst index edb603f7..a78dce7e 100644 --- a/docs2/api/methods/leave_chat.rst +++ b/docs2/api/methods/leave_chat.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return LeaveChat(...) \ No newline at end of file + return LeaveChat(...) diff --git a/docs2/api/methods/log_out.rst b/docs2/api/methods/log_out.rst index 46cc92c9..0049c3f2 100644 --- a/docs2/api/methods/log_out.rst +++ b/docs2/api/methods/log_out.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return LogOut(...) \ No newline at end of file + return LogOut(...) diff --git a/docs2/api/methods/pin_chat_message.rst b/docs2/api/methods/pin_chat_message.rst index 1c3dc9ee..717f86a1 100644 --- a/docs2/api/methods/pin_chat_message.rst +++ b/docs2/api/methods/pin_chat_message.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return PinChatMessage(...) \ No newline at end of file + return PinChatMessage(...) diff --git a/docs2/api/methods/promote_chat_member.rst b/docs2/api/methods/promote_chat_member.rst index ec883f59..67bf3671 100644 --- a/docs2/api/methods/promote_chat_member.rst +++ b/docs2/api/methods/promote_chat_member.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return PromoteChatMember(...) \ No newline at end of file + return PromoteChatMember(...) diff --git a/docs2/api/methods/restrict_chat_member.rst b/docs2/api/methods/restrict_chat_member.rst index 47cadd01..a93c4c92 100644 --- a/docs2/api/methods/restrict_chat_member.rst +++ b/docs2/api/methods/restrict_chat_member.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return RestrictChatMember(...) \ No newline at end of file + return RestrictChatMember(...) diff --git a/docs2/api/methods/revoke_chat_invite_link.rst b/docs2/api/methods/revoke_chat_invite_link.rst new file mode 100644 index 00000000..530133f8 --- /dev/null +++ b/docs2/api/methods/revoke_chat_invite_link.rst @@ -0,0 +1,51 @@ +#################### +revokeChatInviteLink +#################### + +Returns: :obj:`ChatInviteLink` + +.. automodule:: aiogram.methods.revoke_chat_invite_link + :members: + :member-order: bysource + :undoc-members: True + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: ChatInviteLink = await bot.revoke_chat_invite_link(...) + + +Method as object +---------------- + +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 +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: ChatInviteLink = await bot(RevokeChatInviteLink(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return RevokeChatInviteLink(...) diff --git a/docs2/api/methods/send_animation.rst b/docs2/api/methods/send_animation.rst index 8c2515a7..2e6284b5 100644 --- a/docs2/api/methods/send_animation.rst +++ b/docs2/api/methods/send_animation.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SendAnimation(...) \ No newline at end of file + return SendAnimation(...) diff --git a/docs2/api/methods/send_audio.rst b/docs2/api/methods/send_audio.rst index 9da55ded..ce023e84 100644 --- a/docs2/api/methods/send_audio.rst +++ b/docs2/api/methods/send_audio.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SendAudio(...) \ No newline at end of file + return SendAudio(...) diff --git a/docs2/api/methods/send_chat_action.rst b/docs2/api/methods/send_chat_action.rst index 156915f8..97d3bd22 100644 --- a/docs2/api/methods/send_chat_action.rst +++ b/docs2/api/methods/send_chat_action.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SendChatAction(...) \ No newline at end of file + return SendChatAction(...) diff --git a/docs2/api/methods/send_contact.rst b/docs2/api/methods/send_contact.rst index 6560a367..48cae668 100644 --- a/docs2/api/methods/send_contact.rst +++ b/docs2/api/methods/send_contact.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SendContact(...) \ No newline at end of file + return SendContact(...) diff --git a/docs2/api/methods/send_dice.rst b/docs2/api/methods/send_dice.rst index 9348d2b5..2774fd6d 100644 --- a/docs2/api/methods/send_dice.rst +++ b/docs2/api/methods/send_dice.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SendDice(...) \ No newline at end of file + return SendDice(...) diff --git a/docs2/api/methods/send_document.rst b/docs2/api/methods/send_document.rst index 2996da0d..5134bcde 100644 --- a/docs2/api/methods/send_document.rst +++ b/docs2/api/methods/send_document.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SendDocument(...) \ No newline at end of file + return SendDocument(...) diff --git a/docs2/api/methods/send_game.rst b/docs2/api/methods/send_game.rst index 0526baaa..149e3131 100644 --- a/docs2/api/methods/send_game.rst +++ b/docs2/api/methods/send_game.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SendGame(...) \ No newline at end of file + return SendGame(...) diff --git a/docs2/api/methods/send_invoice.rst b/docs2/api/methods/send_invoice.rst index f7d88111..90132a46 100644 --- a/docs2/api/methods/send_invoice.rst +++ b/docs2/api/methods/send_invoice.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SendInvoice(...) \ No newline at end of file + return SendInvoice(...) diff --git a/docs2/api/methods/send_location.rst b/docs2/api/methods/send_location.rst index 3694f8a6..769d6724 100644 --- a/docs2/api/methods/send_location.rst +++ b/docs2/api/methods/send_location.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SendLocation(...) \ No newline at end of file + return SendLocation(...) diff --git a/docs2/api/methods/send_media_group.rst b/docs2/api/methods/send_media_group.rst index 7f0dfe75..c962e049 100644 --- a/docs2/api/methods/send_media_group.rst +++ b/docs2/api/methods/send_media_group.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SendMediaGroup(...) \ No newline at end of file + return SendMediaGroup(...) diff --git a/docs2/api/methods/send_message.rst b/docs2/api/methods/send_message.rst index 318684bf..c054b382 100644 --- a/docs2/api/methods/send_message.rst +++ b/docs2/api/methods/send_message.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SendMessage(...) \ No newline at end of file + return SendMessage(...) diff --git a/docs2/api/methods/send_photo.rst b/docs2/api/methods/send_photo.rst index 313b815e..f6dfd0f5 100644 --- a/docs2/api/methods/send_photo.rst +++ b/docs2/api/methods/send_photo.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SendPhoto(...) \ No newline at end of file + return SendPhoto(...) diff --git a/docs2/api/methods/send_poll.rst b/docs2/api/methods/send_poll.rst index e83d3240..7261399b 100644 --- a/docs2/api/methods/send_poll.rst +++ b/docs2/api/methods/send_poll.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SendPoll(...) \ No newline at end of file + return SendPoll(...) diff --git a/docs2/api/methods/send_sticker.rst b/docs2/api/methods/send_sticker.rst index ca77bd92..9c27417b 100644 --- a/docs2/api/methods/send_sticker.rst +++ b/docs2/api/methods/send_sticker.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SendSticker(...) \ No newline at end of file + return SendSticker(...) diff --git a/docs2/api/methods/send_venue.rst b/docs2/api/methods/send_venue.rst index 6c19d76e..f87100de 100644 --- a/docs2/api/methods/send_venue.rst +++ b/docs2/api/methods/send_venue.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SendVenue(...) \ No newline at end of file + return SendVenue(...) diff --git a/docs2/api/methods/send_video.rst b/docs2/api/methods/send_video.rst index 4328017a..8fe6ed40 100644 --- a/docs2/api/methods/send_video.rst +++ b/docs2/api/methods/send_video.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SendVideo(...) \ No newline at end of file + return SendVideo(...) diff --git a/docs2/api/methods/send_video_note.rst b/docs2/api/methods/send_video_note.rst index f661a9e0..f10f534e 100644 --- a/docs2/api/methods/send_video_note.rst +++ b/docs2/api/methods/send_video_note.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SendVideoNote(...) \ No newline at end of file + return SendVideoNote(...) diff --git a/docs2/api/methods/send_voice.rst b/docs2/api/methods/send_voice.rst index 82159641..b3583bb1 100644 --- a/docs2/api/methods/send_voice.rst +++ b/docs2/api/methods/send_voice.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SendVoice(...) \ No newline at end of file + return SendVoice(...) diff --git a/docs2/api/methods/set_chat_administrator_custom_title.rst b/docs2/api/methods/set_chat_administrator_custom_title.rst index 3e942918..ca73df29 100644 --- a/docs2/api/methods/set_chat_administrator_custom_title.rst +++ b/docs2/api/methods/set_chat_administrator_custom_title.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SetChatAdministratorCustomTitle(...) \ No newline at end of file + return SetChatAdministratorCustomTitle(...) diff --git a/docs2/api/methods/set_chat_description.rst b/docs2/api/methods/set_chat_description.rst index af1ba8c5..0625516c 100644 --- a/docs2/api/methods/set_chat_description.rst +++ b/docs2/api/methods/set_chat_description.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SetChatDescription(...) \ No newline at end of file + return SetChatDescription(...) diff --git a/docs2/api/methods/set_chat_permissions.rst b/docs2/api/methods/set_chat_permissions.rst index 87f8fa84..b287a7e2 100644 --- a/docs2/api/methods/set_chat_permissions.rst +++ b/docs2/api/methods/set_chat_permissions.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SetChatPermissions(...) \ No newline at end of file + return SetChatPermissions(...) diff --git a/docs2/api/methods/set_chat_photo.rst b/docs2/api/methods/set_chat_photo.rst index a2133a14..536696e8 100644 --- a/docs2/api/methods/set_chat_photo.rst +++ b/docs2/api/methods/set_chat_photo.rst @@ -42,4 +42,3 @@ With specific bot .. code-block:: python result: bool = await bot(SetChatPhoto(...)) - diff --git a/docs2/api/methods/set_chat_sticker_set.rst b/docs2/api/methods/set_chat_sticker_set.rst index f0a76edb..71e447b2 100644 --- a/docs2/api/methods/set_chat_sticker_set.rst +++ b/docs2/api/methods/set_chat_sticker_set.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SetChatStickerSet(...) \ No newline at end of file + return SetChatStickerSet(...) diff --git a/docs2/api/methods/set_chat_title.rst b/docs2/api/methods/set_chat_title.rst index efba5e20..b9473be9 100644 --- a/docs2/api/methods/set_chat_title.rst +++ b/docs2/api/methods/set_chat_title.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SetChatTitle(...) \ No newline at end of file + return SetChatTitle(...) diff --git a/docs2/api/methods/set_game_score.rst b/docs2/api/methods/set_game_score.rst index e631c07b..de9dd9b3 100644 --- a/docs2/api/methods/set_game_score.rst +++ b/docs2/api/methods/set_game_score.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SetGameScore(...) \ No newline at end of file + return SetGameScore(...) diff --git a/docs2/api/methods/set_my_commands.rst b/docs2/api/methods/set_my_commands.rst index 5f6db367..456bf270 100644 --- a/docs2/api/methods/set_my_commands.rst +++ b/docs2/api/methods/set_my_commands.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SetMyCommands(...) \ No newline at end of file + return SetMyCommands(...) diff --git a/docs2/api/methods/set_passport_data_errors.rst b/docs2/api/methods/set_passport_data_errors.rst index 14c00b44..8db5be3c 100644 --- a/docs2/api/methods/set_passport_data_errors.rst +++ b/docs2/api/methods/set_passport_data_errors.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SetPassportDataErrors(...) \ No newline at end of file + return SetPassportDataErrors(...) diff --git a/docs2/api/methods/set_sticker_position_in_set.rst b/docs2/api/methods/set_sticker_position_in_set.rst index a9efce31..f0b4771b 100644 --- a/docs2/api/methods/set_sticker_position_in_set.rst +++ b/docs2/api/methods/set_sticker_position_in_set.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SetStickerPositionInSet(...) \ No newline at end of file + return SetStickerPositionInSet(...) diff --git a/docs2/api/methods/set_sticker_set_thumb.rst b/docs2/api/methods/set_sticker_set_thumb.rst index d2959f03..fb4a85e6 100644 --- a/docs2/api/methods/set_sticker_set_thumb.rst +++ b/docs2/api/methods/set_sticker_set_thumb.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SetStickerSetThumb(...) \ No newline at end of file + return SetStickerSetThumb(...) diff --git a/docs2/api/methods/set_webhook.rst b/docs2/api/methods/set_webhook.rst index c5188243..5e0a6e20 100644 --- a/docs2/api/methods/set_webhook.rst +++ b/docs2/api/methods/set_webhook.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return SetWebhook(...) \ No newline at end of file + return SetWebhook(...) diff --git a/docs2/api/methods/stop_message_live_location.rst b/docs2/api/methods/stop_message_live_location.rst index bc997f43..f7519860 100644 --- a/docs2/api/methods/stop_message_live_location.rst +++ b/docs2/api/methods/stop_message_live_location.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return StopMessageLiveLocation(...) \ No newline at end of file + return StopMessageLiveLocation(...) diff --git a/docs2/api/methods/stop_poll.rst b/docs2/api/methods/stop_poll.rst index e0ad1046..2e14c094 100644 --- a/docs2/api/methods/stop_poll.rst +++ b/docs2/api/methods/stop_poll.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return StopPoll(...) \ No newline at end of file + return StopPoll(...) diff --git a/docs2/api/methods/unban_chat_member.rst b/docs2/api/methods/unban_chat_member.rst index c49779e4..6aae1669 100644 --- a/docs2/api/methods/unban_chat_member.rst +++ b/docs2/api/methods/unban_chat_member.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return UnbanChatMember(...) \ No newline at end of file + return UnbanChatMember(...) diff --git a/docs2/api/methods/unpin_all_chat_messages.rst b/docs2/api/methods/unpin_all_chat_messages.rst index c4c9b930..90c2ca9e 100644 --- a/docs2/api/methods/unpin_all_chat_messages.rst +++ b/docs2/api/methods/unpin_all_chat_messages.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return UnpinAllChatMessages(...) \ No newline at end of file + return UnpinAllChatMessages(...) diff --git a/docs2/api/methods/unpin_chat_message.rst b/docs2/api/methods/unpin_chat_message.rst index c1d1d68d..02c6e816 100644 --- a/docs2/api/methods/unpin_chat_message.rst +++ b/docs2/api/methods/unpin_chat_message.rst @@ -48,4 +48,4 @@ As reply into Webhook in handler .. code-block:: python - return UnpinChatMessage(...) \ No newline at end of file + return UnpinChatMessage(...) diff --git a/docs2/api/methods/upload_sticker_file.rst b/docs2/api/methods/upload_sticker_file.rst index 4d763556..210c9784 100644 --- a/docs2/api/methods/upload_sticker_file.rst +++ b/docs2/api/methods/upload_sticker_file.rst @@ -42,4 +42,3 @@ With specific bot .. code-block:: python result: File = await bot(UploadStickerFile(...)) - diff --git a/docs2/api/types/animation.rst b/docs2/api/types/animation.rst index 4d48b1e1..1d111c20 100644 --- a/docs2/api/types/animation.rst +++ b/docs2/api/types/animation.rst @@ -6,4 +6,4 @@ Animation .. automodule:: aiogram.types.animation :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/audio.rst b/docs2/api/types/audio.rst index 9eba9027..e29b246c 100644 --- a/docs2/api/types/audio.rst +++ b/docs2/api/types/audio.rst @@ -6,4 +6,4 @@ Audio .. automodule:: aiogram.types.audio :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/bot_command.rst b/docs2/api/types/bot_command.rst index a8364c68..4b8c60ab 100644 --- a/docs2/api/types/bot_command.rst +++ b/docs2/api/types/bot_command.rst @@ -6,4 +6,4 @@ BotCommand .. automodule:: aiogram.types.bot_command :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/callback_game.rst b/docs2/api/types/callback_game.rst index 89f2c91e..789519f3 100644 --- a/docs2/api/types/callback_game.rst +++ b/docs2/api/types/callback_game.rst @@ -6,4 +6,4 @@ CallbackGame .. automodule:: aiogram.types.callback_game :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/callback_query.rst b/docs2/api/types/callback_query.rst index f8d34ddd..22ddc99b 100644 --- a/docs2/api/types/callback_query.rst +++ b/docs2/api/types/callback_query.rst @@ -6,4 +6,4 @@ CallbackQuery .. automodule:: aiogram.types.callback_query :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/chat.rst b/docs2/api/types/chat.rst index 800dead4..5b506b1b 100644 --- a/docs2/api/types/chat.rst +++ b/docs2/api/types/chat.rst @@ -6,4 +6,4 @@ Chat .. automodule:: aiogram.types.chat :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/chat_invite_link.rst b/docs2/api/types/chat_invite_link.rst new file mode 100644 index 00000000..d64e28ae --- /dev/null +++ b/docs2/api/types/chat_invite_link.rst @@ -0,0 +1,9 @@ +############## +ChatInviteLink +############## + + +.. automodule:: aiogram.types.chat_invite_link + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs2/api/types/chat_location.rst b/docs2/api/types/chat_location.rst index 84f4bef9..5d528095 100644 --- a/docs2/api/types/chat_location.rst +++ b/docs2/api/types/chat_location.rst @@ -6,4 +6,4 @@ ChatLocation .. automodule:: aiogram.types.chat_location :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/chat_member.rst b/docs2/api/types/chat_member.rst index 4fff69f9..bd357f7c 100644 --- a/docs2/api/types/chat_member.rst +++ b/docs2/api/types/chat_member.rst @@ -6,4 +6,4 @@ ChatMember .. automodule:: aiogram.types.chat_member :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/chat_member_updated.rst b/docs2/api/types/chat_member_updated.rst new file mode 100644 index 00000000..e02ddd8b --- /dev/null +++ b/docs2/api/types/chat_member_updated.rst @@ -0,0 +1,9 @@ +################# +ChatMemberUpdated +################# + + +.. automodule:: aiogram.types.chat_member_updated + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs2/api/types/chat_permissions.rst b/docs2/api/types/chat_permissions.rst index b3020a19..6eedb23b 100644 --- a/docs2/api/types/chat_permissions.rst +++ b/docs2/api/types/chat_permissions.rst @@ -6,4 +6,4 @@ ChatPermissions .. automodule:: aiogram.types.chat_permissions :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/chat_photo.rst b/docs2/api/types/chat_photo.rst index bc7c8a5e..7821d5ba 100644 --- a/docs2/api/types/chat_photo.rst +++ b/docs2/api/types/chat_photo.rst @@ -6,4 +6,4 @@ ChatPhoto .. automodule:: aiogram.types.chat_photo :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/chosen_inline_result.rst b/docs2/api/types/chosen_inline_result.rst index fe4d7c11..3f86a983 100644 --- a/docs2/api/types/chosen_inline_result.rst +++ b/docs2/api/types/chosen_inline_result.rst @@ -6,4 +6,4 @@ ChosenInlineResult .. automodule:: aiogram.types.chosen_inline_result :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/contact.rst b/docs2/api/types/contact.rst index aa75232e..f99e1d27 100644 --- a/docs2/api/types/contact.rst +++ b/docs2/api/types/contact.rst @@ -6,4 +6,4 @@ Contact .. automodule:: aiogram.types.contact :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/dice.rst b/docs2/api/types/dice.rst index 15dbab13..41ddf6c4 100644 --- a/docs2/api/types/dice.rst +++ b/docs2/api/types/dice.rst @@ -6,4 +6,4 @@ Dice .. automodule:: aiogram.types.dice :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/document.rst b/docs2/api/types/document.rst index 8138cf2c..48799778 100644 --- a/docs2/api/types/document.rst +++ b/docs2/api/types/document.rst @@ -6,4 +6,4 @@ Document .. automodule:: aiogram.types.document :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/encrypted_credentials.rst b/docs2/api/types/encrypted_credentials.rst index 185e7881..41425c95 100644 --- a/docs2/api/types/encrypted_credentials.rst +++ b/docs2/api/types/encrypted_credentials.rst @@ -6,4 +6,4 @@ EncryptedCredentials .. automodule:: aiogram.types.encrypted_credentials :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/encrypted_passport_element.rst b/docs2/api/types/encrypted_passport_element.rst index 78a5c223..0acf7a8e 100644 --- a/docs2/api/types/encrypted_passport_element.rst +++ b/docs2/api/types/encrypted_passport_element.rst @@ -6,4 +6,4 @@ EncryptedPassportElement .. automodule:: aiogram.types.encrypted_passport_element :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/file.rst b/docs2/api/types/file.rst index 4089e6c8..5a9d920e 100644 --- a/docs2/api/types/file.rst +++ b/docs2/api/types/file.rst @@ -6,4 +6,4 @@ File .. automodule:: aiogram.types.file :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/force_reply.rst b/docs2/api/types/force_reply.rst index e15d8b18..326cd91f 100644 --- a/docs2/api/types/force_reply.rst +++ b/docs2/api/types/force_reply.rst @@ -6,4 +6,4 @@ ForceReply .. automodule:: aiogram.types.force_reply :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/game.rst b/docs2/api/types/game.rst index 706206fc..62a7f390 100644 --- a/docs2/api/types/game.rst +++ b/docs2/api/types/game.rst @@ -6,4 +6,4 @@ Game .. automodule:: aiogram.types.game :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/game_high_score.rst b/docs2/api/types/game_high_score.rst index 044c70ed..6f8d8194 100644 --- a/docs2/api/types/game_high_score.rst +++ b/docs2/api/types/game_high_score.rst @@ -6,4 +6,4 @@ GameHighScore .. automodule:: aiogram.types.game_high_score :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/index.rst b/docs2/api/types/index.rst index 07f8be47..7a5d0ac3 100644 --- a/docs2/api/types/index.rst +++ b/docs2/api/types/index.rst @@ -41,6 +41,10 @@ Available types location venue proximity_alert_triggered + message_auto_delete_timer_changed + voice_chat_started + voice_chat_ended + voice_chat_participants_invited user_profile_photos file reply_keyboard_markup @@ -53,7 +57,9 @@ Available types callback_query force_reply chat_photo + chat_invite_link chat_member + chat_member_updated chat_permissions chat_location bot_command @@ -158,4 +164,3 @@ Games game callback_game game_high_score - diff --git a/docs2/api/types/inline_keyboard_button.rst b/docs2/api/types/inline_keyboard_button.rst index 3689b038..1075ad01 100644 --- a/docs2/api/types/inline_keyboard_button.rst +++ b/docs2/api/types/inline_keyboard_button.rst @@ -6,4 +6,4 @@ InlineKeyboardButton .. automodule:: aiogram.types.inline_keyboard_button :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/inline_keyboard_markup.rst b/docs2/api/types/inline_keyboard_markup.rst index bdb03b8e..b7c5108f 100644 --- a/docs2/api/types/inline_keyboard_markup.rst +++ b/docs2/api/types/inline_keyboard_markup.rst @@ -6,4 +6,4 @@ InlineKeyboardMarkup .. automodule:: aiogram.types.inline_keyboard_markup :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/inline_query.rst b/docs2/api/types/inline_query.rst index ab1b08e5..7577b29c 100644 --- a/docs2/api/types/inline_query.rst +++ b/docs2/api/types/inline_query.rst @@ -6,4 +6,4 @@ InlineQuery .. automodule:: aiogram.types.inline_query :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/inline_query_result.rst b/docs2/api/types/inline_query_result.rst index 8f65bd92..ba3e265f 100644 --- a/docs2/api/types/inline_query_result.rst +++ b/docs2/api/types/inline_query_result.rst @@ -6,4 +6,4 @@ InlineQueryResult .. automodule:: aiogram.types.inline_query_result :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/inline_query_result_article.rst b/docs2/api/types/inline_query_result_article.rst index a633ba41..8ffb1db9 100644 --- a/docs2/api/types/inline_query_result_article.rst +++ b/docs2/api/types/inline_query_result_article.rst @@ -6,4 +6,4 @@ InlineQueryResultArticle .. automodule:: aiogram.types.inline_query_result_article :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/inline_query_result_audio.rst b/docs2/api/types/inline_query_result_audio.rst index 584ee611..50858460 100644 --- a/docs2/api/types/inline_query_result_audio.rst +++ b/docs2/api/types/inline_query_result_audio.rst @@ -6,4 +6,4 @@ InlineQueryResultAudio .. automodule:: aiogram.types.inline_query_result_audio :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/inline_query_result_cached_audio.rst b/docs2/api/types/inline_query_result_cached_audio.rst index af64c31a..bcce043d 100644 --- a/docs2/api/types/inline_query_result_cached_audio.rst +++ b/docs2/api/types/inline_query_result_cached_audio.rst @@ -6,4 +6,4 @@ InlineQueryResultCachedAudio .. automodule:: aiogram.types.inline_query_result_cached_audio :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/inline_query_result_cached_document.rst b/docs2/api/types/inline_query_result_cached_document.rst index 39ebaf3c..0813734d 100644 --- a/docs2/api/types/inline_query_result_cached_document.rst +++ b/docs2/api/types/inline_query_result_cached_document.rst @@ -6,4 +6,4 @@ InlineQueryResultCachedDocument .. automodule:: aiogram.types.inline_query_result_cached_document :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/inline_query_result_cached_gif.rst b/docs2/api/types/inline_query_result_cached_gif.rst index 7d88ab69..d1103a55 100644 --- a/docs2/api/types/inline_query_result_cached_gif.rst +++ b/docs2/api/types/inline_query_result_cached_gif.rst @@ -6,4 +6,4 @@ InlineQueryResultCachedGif .. automodule:: aiogram.types.inline_query_result_cached_gif :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/inline_query_result_cached_mpeg4_gif.rst b/docs2/api/types/inline_query_result_cached_mpeg4_gif.rst index 23e06635..022ce1ca 100644 --- a/docs2/api/types/inline_query_result_cached_mpeg4_gif.rst +++ b/docs2/api/types/inline_query_result_cached_mpeg4_gif.rst @@ -6,4 +6,4 @@ InlineQueryResultCachedMpeg4Gif .. automodule:: aiogram.types.inline_query_result_cached_mpeg4_gif :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/inline_query_result_cached_photo.rst b/docs2/api/types/inline_query_result_cached_photo.rst index 3ebcc6be..3fcd27bc 100644 --- a/docs2/api/types/inline_query_result_cached_photo.rst +++ b/docs2/api/types/inline_query_result_cached_photo.rst @@ -6,4 +6,4 @@ InlineQueryResultCachedPhoto .. automodule:: aiogram.types.inline_query_result_cached_photo :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/inline_query_result_cached_sticker.rst b/docs2/api/types/inline_query_result_cached_sticker.rst index 3156775a..30a5d5b3 100644 --- a/docs2/api/types/inline_query_result_cached_sticker.rst +++ b/docs2/api/types/inline_query_result_cached_sticker.rst @@ -6,4 +6,4 @@ InlineQueryResultCachedSticker .. automodule:: aiogram.types.inline_query_result_cached_sticker :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/inline_query_result_cached_video.rst b/docs2/api/types/inline_query_result_cached_video.rst index 51b95a05..0c5acbe9 100644 --- a/docs2/api/types/inline_query_result_cached_video.rst +++ b/docs2/api/types/inline_query_result_cached_video.rst @@ -6,4 +6,4 @@ InlineQueryResultCachedVideo .. automodule:: aiogram.types.inline_query_result_cached_video :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/inline_query_result_cached_voice.rst b/docs2/api/types/inline_query_result_cached_voice.rst index b2c70d60..5b4f0d8e 100644 --- a/docs2/api/types/inline_query_result_cached_voice.rst +++ b/docs2/api/types/inline_query_result_cached_voice.rst @@ -6,4 +6,4 @@ InlineQueryResultCachedVoice .. automodule:: aiogram.types.inline_query_result_cached_voice :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/inline_query_result_contact.rst b/docs2/api/types/inline_query_result_contact.rst index e2ae2f9c..123b4d61 100644 --- a/docs2/api/types/inline_query_result_contact.rst +++ b/docs2/api/types/inline_query_result_contact.rst @@ -6,4 +6,4 @@ InlineQueryResultContact .. automodule:: aiogram.types.inline_query_result_contact :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/inline_query_result_document.rst b/docs2/api/types/inline_query_result_document.rst index 931b8938..6352c6c3 100644 --- a/docs2/api/types/inline_query_result_document.rst +++ b/docs2/api/types/inline_query_result_document.rst @@ -6,4 +6,4 @@ InlineQueryResultDocument .. automodule:: aiogram.types.inline_query_result_document :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/inline_query_result_game.rst b/docs2/api/types/inline_query_result_game.rst index bbe99fcd..562c1974 100644 --- a/docs2/api/types/inline_query_result_game.rst +++ b/docs2/api/types/inline_query_result_game.rst @@ -6,4 +6,4 @@ InlineQueryResultGame .. automodule:: aiogram.types.inline_query_result_game :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/inline_query_result_gif.rst b/docs2/api/types/inline_query_result_gif.rst index fbdf91dd..552252de 100644 --- a/docs2/api/types/inline_query_result_gif.rst +++ b/docs2/api/types/inline_query_result_gif.rst @@ -6,4 +6,4 @@ InlineQueryResultGif .. automodule:: aiogram.types.inline_query_result_gif :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/inline_query_result_location.rst b/docs2/api/types/inline_query_result_location.rst index 5edd684f..fcde9fb2 100644 --- a/docs2/api/types/inline_query_result_location.rst +++ b/docs2/api/types/inline_query_result_location.rst @@ -6,4 +6,4 @@ InlineQueryResultLocation .. automodule:: aiogram.types.inline_query_result_location :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/inline_query_result_mpeg4_gif.rst b/docs2/api/types/inline_query_result_mpeg4_gif.rst index 6fc64d7d..ccdfb06f 100644 --- a/docs2/api/types/inline_query_result_mpeg4_gif.rst +++ b/docs2/api/types/inline_query_result_mpeg4_gif.rst @@ -6,4 +6,4 @@ InlineQueryResultMpeg4Gif .. automodule:: aiogram.types.inline_query_result_mpeg4_gif :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/inline_query_result_photo.rst b/docs2/api/types/inline_query_result_photo.rst index 1b171e93..4af41c8e 100644 --- a/docs2/api/types/inline_query_result_photo.rst +++ b/docs2/api/types/inline_query_result_photo.rst @@ -6,4 +6,4 @@ InlineQueryResultPhoto .. automodule:: aiogram.types.inline_query_result_photo :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/inline_query_result_venue.rst b/docs2/api/types/inline_query_result_venue.rst index 20e9289f..b3c40c01 100644 --- a/docs2/api/types/inline_query_result_venue.rst +++ b/docs2/api/types/inline_query_result_venue.rst @@ -6,4 +6,4 @@ InlineQueryResultVenue .. automodule:: aiogram.types.inline_query_result_venue :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/inline_query_result_video.rst b/docs2/api/types/inline_query_result_video.rst index 374dcf17..e27f6be3 100644 --- a/docs2/api/types/inline_query_result_video.rst +++ b/docs2/api/types/inline_query_result_video.rst @@ -6,4 +6,4 @@ InlineQueryResultVideo .. automodule:: aiogram.types.inline_query_result_video :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/inline_query_result_voice.rst b/docs2/api/types/inline_query_result_voice.rst index 23717afa..4496c4fe 100644 --- a/docs2/api/types/inline_query_result_voice.rst +++ b/docs2/api/types/inline_query_result_voice.rst @@ -6,4 +6,4 @@ InlineQueryResultVoice .. automodule:: aiogram.types.inline_query_result_voice :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/input_contact_message_content.rst b/docs2/api/types/input_contact_message_content.rst index 51c8cc58..a3100b83 100644 --- a/docs2/api/types/input_contact_message_content.rst +++ b/docs2/api/types/input_contact_message_content.rst @@ -6,4 +6,4 @@ InputContactMessageContent .. automodule:: aiogram.types.input_contact_message_content :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/input_file.rst b/docs2/api/types/input_file.rst index d295de5f..4197e6cd 100644 --- a/docs2/api/types/input_file.rst +++ b/docs2/api/types/input_file.rst @@ -6,4 +6,4 @@ InputFile .. automodule:: aiogram.types.input_file :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/input_location_message_content.rst b/docs2/api/types/input_location_message_content.rst index 9f33b5cc..6ca59b0b 100644 --- a/docs2/api/types/input_location_message_content.rst +++ b/docs2/api/types/input_location_message_content.rst @@ -6,4 +6,4 @@ InputLocationMessageContent .. automodule:: aiogram.types.input_location_message_content :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/input_media.rst b/docs2/api/types/input_media.rst index 3c4f8e0c..9b3f386b 100644 --- a/docs2/api/types/input_media.rst +++ b/docs2/api/types/input_media.rst @@ -6,4 +6,4 @@ InputMedia .. automodule:: aiogram.types.input_media :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/input_media_animation.rst b/docs2/api/types/input_media_animation.rst index 9f16d9de..9c00494b 100644 --- a/docs2/api/types/input_media_animation.rst +++ b/docs2/api/types/input_media_animation.rst @@ -6,4 +6,4 @@ InputMediaAnimation .. automodule:: aiogram.types.input_media_animation :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/input_media_audio.rst b/docs2/api/types/input_media_audio.rst index a312af6f..c12d307c 100644 --- a/docs2/api/types/input_media_audio.rst +++ b/docs2/api/types/input_media_audio.rst @@ -6,4 +6,4 @@ InputMediaAudio .. automodule:: aiogram.types.input_media_audio :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/input_media_document.rst b/docs2/api/types/input_media_document.rst index b5f6c196..645b78e7 100644 --- a/docs2/api/types/input_media_document.rst +++ b/docs2/api/types/input_media_document.rst @@ -6,4 +6,4 @@ InputMediaDocument .. automodule:: aiogram.types.input_media_document :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/input_media_photo.rst b/docs2/api/types/input_media_photo.rst index 59ddb8f5..32656e29 100644 --- a/docs2/api/types/input_media_photo.rst +++ b/docs2/api/types/input_media_photo.rst @@ -6,4 +6,4 @@ InputMediaPhoto .. automodule:: aiogram.types.input_media_photo :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/input_media_video.rst b/docs2/api/types/input_media_video.rst index ef2ded4d..57099c51 100644 --- a/docs2/api/types/input_media_video.rst +++ b/docs2/api/types/input_media_video.rst @@ -6,4 +6,4 @@ InputMediaVideo .. automodule:: aiogram.types.input_media_video :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/input_message_content.rst b/docs2/api/types/input_message_content.rst index 945f4ee1..84040fb7 100644 --- a/docs2/api/types/input_message_content.rst +++ b/docs2/api/types/input_message_content.rst @@ -6,4 +6,4 @@ InputMessageContent .. automodule:: aiogram.types.input_message_content :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/input_text_message_content.rst b/docs2/api/types/input_text_message_content.rst index 48ca93a1..1eb83e54 100644 --- a/docs2/api/types/input_text_message_content.rst +++ b/docs2/api/types/input_text_message_content.rst @@ -6,4 +6,4 @@ InputTextMessageContent .. automodule:: aiogram.types.input_text_message_content :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/input_venue_message_content.rst b/docs2/api/types/input_venue_message_content.rst index ed0f5792..479a99a0 100644 --- a/docs2/api/types/input_venue_message_content.rst +++ b/docs2/api/types/input_venue_message_content.rst @@ -6,4 +6,4 @@ InputVenueMessageContent .. automodule:: aiogram.types.input_venue_message_content :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/invoice.rst b/docs2/api/types/invoice.rst index b8c51922..24ecc961 100644 --- a/docs2/api/types/invoice.rst +++ b/docs2/api/types/invoice.rst @@ -6,4 +6,4 @@ Invoice .. automodule:: aiogram.types.invoice :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/keyboard_button.rst b/docs2/api/types/keyboard_button.rst index 7321914d..9faca06d 100644 --- a/docs2/api/types/keyboard_button.rst +++ b/docs2/api/types/keyboard_button.rst @@ -6,4 +6,4 @@ KeyboardButton .. automodule:: aiogram.types.keyboard_button :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/keyboard_button_poll_type.rst b/docs2/api/types/keyboard_button_poll_type.rst index e24d92da..9a4974a5 100644 --- a/docs2/api/types/keyboard_button_poll_type.rst +++ b/docs2/api/types/keyboard_button_poll_type.rst @@ -6,4 +6,4 @@ KeyboardButtonPollType .. automodule:: aiogram.types.keyboard_button_poll_type :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/labeled_price.rst b/docs2/api/types/labeled_price.rst index 69512ab2..a76b28f3 100644 --- a/docs2/api/types/labeled_price.rst +++ b/docs2/api/types/labeled_price.rst @@ -6,4 +6,4 @@ LabeledPrice .. automodule:: aiogram.types.labeled_price :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/location.rst b/docs2/api/types/location.rst index 244331c8..2957683a 100644 --- a/docs2/api/types/location.rst +++ b/docs2/api/types/location.rst @@ -6,4 +6,4 @@ Location .. automodule:: aiogram.types.location :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/login_url.rst b/docs2/api/types/login_url.rst index 7122fe50..f72b28b6 100644 --- a/docs2/api/types/login_url.rst +++ b/docs2/api/types/login_url.rst @@ -6,4 +6,4 @@ LoginUrl .. automodule:: aiogram.types.login_url :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/mask_position.rst b/docs2/api/types/mask_position.rst index d7dd7bbb..74c28494 100644 --- a/docs2/api/types/mask_position.rst +++ b/docs2/api/types/mask_position.rst @@ -6,4 +6,4 @@ MaskPosition .. automodule:: aiogram.types.mask_position :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/message.rst b/docs2/api/types/message.rst index ea9ebcdd..5e1be4f7 100644 --- a/docs2/api/types/message.rst +++ b/docs2/api/types/message.rst @@ -6,4 +6,4 @@ Message .. automodule:: aiogram.types.message :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/message_auto_delete_timer_changed.rst b/docs2/api/types/message_auto_delete_timer_changed.rst new file mode 100644 index 00000000..102caacc --- /dev/null +++ b/docs2/api/types/message_auto_delete_timer_changed.rst @@ -0,0 +1,9 @@ +############################# +MessageAutoDeleteTimerChanged +############################# + + +.. automodule:: aiogram.types.message_auto_delete_timer_changed + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs2/api/types/message_entity.rst b/docs2/api/types/message_entity.rst index fb4ccb0c..38ee737d 100644 --- a/docs2/api/types/message_entity.rst +++ b/docs2/api/types/message_entity.rst @@ -6,4 +6,4 @@ MessageEntity .. automodule:: aiogram.types.message_entity :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/message_id.rst b/docs2/api/types/message_id.rst index 35ee56fa..2ed2adc6 100644 --- a/docs2/api/types/message_id.rst +++ b/docs2/api/types/message_id.rst @@ -6,4 +6,4 @@ MessageId .. automodule:: aiogram.types.message_id :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/order_info.rst b/docs2/api/types/order_info.rst index b32b433c..6180f709 100644 --- a/docs2/api/types/order_info.rst +++ b/docs2/api/types/order_info.rst @@ -6,4 +6,4 @@ OrderInfo .. automodule:: aiogram.types.order_info :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/passport_data.rst b/docs2/api/types/passport_data.rst index 6918a40c..9a3de684 100644 --- a/docs2/api/types/passport_data.rst +++ b/docs2/api/types/passport_data.rst @@ -6,4 +6,4 @@ PassportData .. automodule:: aiogram.types.passport_data :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/passport_element_error.rst b/docs2/api/types/passport_element_error.rst index eb8de72b..8fc30e86 100644 --- a/docs2/api/types/passport_element_error.rst +++ b/docs2/api/types/passport_element_error.rst @@ -6,4 +6,4 @@ PassportElementError .. automodule:: aiogram.types.passport_element_error :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/passport_element_error_data_field.rst b/docs2/api/types/passport_element_error_data_field.rst index 4887f585..b9382471 100644 --- a/docs2/api/types/passport_element_error_data_field.rst +++ b/docs2/api/types/passport_element_error_data_field.rst @@ -6,4 +6,4 @@ PassportElementErrorDataField .. automodule:: aiogram.types.passport_element_error_data_field :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/passport_element_error_file.rst b/docs2/api/types/passport_element_error_file.rst index 849d2904..877def6a 100644 --- a/docs2/api/types/passport_element_error_file.rst +++ b/docs2/api/types/passport_element_error_file.rst @@ -6,4 +6,4 @@ PassportElementErrorFile .. automodule:: aiogram.types.passport_element_error_file :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/passport_element_error_files.rst b/docs2/api/types/passport_element_error_files.rst index 36a3aa94..922b4ffb 100644 --- a/docs2/api/types/passport_element_error_files.rst +++ b/docs2/api/types/passport_element_error_files.rst @@ -6,4 +6,4 @@ PassportElementErrorFiles .. automodule:: aiogram.types.passport_element_error_files :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/passport_element_error_front_side.rst b/docs2/api/types/passport_element_error_front_side.rst index 1e6cb1a4..3f7dfe81 100644 --- a/docs2/api/types/passport_element_error_front_side.rst +++ b/docs2/api/types/passport_element_error_front_side.rst @@ -6,4 +6,4 @@ PassportElementErrorFrontSide .. automodule:: aiogram.types.passport_element_error_front_side :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/passport_element_error_reverse_side.rst b/docs2/api/types/passport_element_error_reverse_side.rst index 56f2291d..dd61c9a1 100644 --- a/docs2/api/types/passport_element_error_reverse_side.rst +++ b/docs2/api/types/passport_element_error_reverse_side.rst @@ -6,4 +6,4 @@ PassportElementErrorReverseSide .. automodule:: aiogram.types.passport_element_error_reverse_side :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/passport_element_error_selfie.rst b/docs2/api/types/passport_element_error_selfie.rst index 082ee422..d3463191 100644 --- a/docs2/api/types/passport_element_error_selfie.rst +++ b/docs2/api/types/passport_element_error_selfie.rst @@ -6,4 +6,4 @@ PassportElementErrorSelfie .. automodule:: aiogram.types.passport_element_error_selfie :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/passport_element_error_translation_file.rst b/docs2/api/types/passport_element_error_translation_file.rst index d30fa6bc..3a0e16aa 100644 --- a/docs2/api/types/passport_element_error_translation_file.rst +++ b/docs2/api/types/passport_element_error_translation_file.rst @@ -6,4 +6,4 @@ PassportElementErrorTranslationFile .. automodule:: aiogram.types.passport_element_error_translation_file :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/passport_element_error_translation_files.rst b/docs2/api/types/passport_element_error_translation_files.rst index 79b0ef79..9ac03422 100644 --- a/docs2/api/types/passport_element_error_translation_files.rst +++ b/docs2/api/types/passport_element_error_translation_files.rst @@ -6,4 +6,4 @@ PassportElementErrorTranslationFiles .. automodule:: aiogram.types.passport_element_error_translation_files :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/passport_element_error_unspecified.rst b/docs2/api/types/passport_element_error_unspecified.rst index d59a985e..ec90bed9 100644 --- a/docs2/api/types/passport_element_error_unspecified.rst +++ b/docs2/api/types/passport_element_error_unspecified.rst @@ -6,4 +6,4 @@ PassportElementErrorUnspecified .. automodule:: aiogram.types.passport_element_error_unspecified :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/passport_file.rst b/docs2/api/types/passport_file.rst index 944cc7e7..4c737fff 100644 --- a/docs2/api/types/passport_file.rst +++ b/docs2/api/types/passport_file.rst @@ -6,4 +6,4 @@ PassportFile .. automodule:: aiogram.types.passport_file :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/photo_size.rst b/docs2/api/types/photo_size.rst index fbd32f33..1086588c 100644 --- a/docs2/api/types/photo_size.rst +++ b/docs2/api/types/photo_size.rst @@ -6,4 +6,4 @@ PhotoSize .. automodule:: aiogram.types.photo_size :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/poll.rst b/docs2/api/types/poll.rst index 3b278712..fd11bc88 100644 --- a/docs2/api/types/poll.rst +++ b/docs2/api/types/poll.rst @@ -6,4 +6,4 @@ Poll .. automodule:: aiogram.types.poll :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/poll_answer.rst b/docs2/api/types/poll_answer.rst index adce5f72..fe92fb6a 100644 --- a/docs2/api/types/poll_answer.rst +++ b/docs2/api/types/poll_answer.rst @@ -6,4 +6,4 @@ PollAnswer .. automodule:: aiogram.types.poll_answer :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/poll_option.rst b/docs2/api/types/poll_option.rst index 5b7bbefb..72ebfbd2 100644 --- a/docs2/api/types/poll_option.rst +++ b/docs2/api/types/poll_option.rst @@ -6,4 +6,4 @@ PollOption .. automodule:: aiogram.types.poll_option :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/pre_checkout_query.rst b/docs2/api/types/pre_checkout_query.rst index 2d9367ef..418c11b9 100644 --- a/docs2/api/types/pre_checkout_query.rst +++ b/docs2/api/types/pre_checkout_query.rst @@ -6,4 +6,4 @@ PreCheckoutQuery .. automodule:: aiogram.types.pre_checkout_query :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/proximity_alert_triggered.rst b/docs2/api/types/proximity_alert_triggered.rst index 1d0ba461..98ac7d2f 100644 --- a/docs2/api/types/proximity_alert_triggered.rst +++ b/docs2/api/types/proximity_alert_triggered.rst @@ -6,4 +6,4 @@ ProximityAlertTriggered .. automodule:: aiogram.types.proximity_alert_triggered :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/reply_keyboard_markup.rst b/docs2/api/types/reply_keyboard_markup.rst index 2f32bdff..a5c5ae85 100644 --- a/docs2/api/types/reply_keyboard_markup.rst +++ b/docs2/api/types/reply_keyboard_markup.rst @@ -6,4 +6,4 @@ ReplyKeyboardMarkup .. automodule:: aiogram.types.reply_keyboard_markup :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/reply_keyboard_remove.rst b/docs2/api/types/reply_keyboard_remove.rst index acc212ee..799ad3a9 100644 --- a/docs2/api/types/reply_keyboard_remove.rst +++ b/docs2/api/types/reply_keyboard_remove.rst @@ -6,4 +6,4 @@ ReplyKeyboardRemove .. automodule:: aiogram.types.reply_keyboard_remove :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/response_parameters.rst b/docs2/api/types/response_parameters.rst index 42a1a4d6..5b7056b8 100644 --- a/docs2/api/types/response_parameters.rst +++ b/docs2/api/types/response_parameters.rst @@ -6,4 +6,4 @@ ResponseParameters .. automodule:: aiogram.types.response_parameters :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/shipping_address.rst b/docs2/api/types/shipping_address.rst index d2b72bde..0421c58e 100644 --- a/docs2/api/types/shipping_address.rst +++ b/docs2/api/types/shipping_address.rst @@ -6,4 +6,4 @@ ShippingAddress .. automodule:: aiogram.types.shipping_address :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/shipping_option.rst b/docs2/api/types/shipping_option.rst index e3976d5f..28e13897 100644 --- a/docs2/api/types/shipping_option.rst +++ b/docs2/api/types/shipping_option.rst @@ -6,4 +6,4 @@ ShippingOption .. automodule:: aiogram.types.shipping_option :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/shipping_query.rst b/docs2/api/types/shipping_query.rst index 9117bbd5..c4ccdf70 100644 --- a/docs2/api/types/shipping_query.rst +++ b/docs2/api/types/shipping_query.rst @@ -6,4 +6,4 @@ ShippingQuery .. automodule:: aiogram.types.shipping_query :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/sticker.rst b/docs2/api/types/sticker.rst index 643e4122..f15dd9ef 100644 --- a/docs2/api/types/sticker.rst +++ b/docs2/api/types/sticker.rst @@ -6,4 +6,4 @@ Sticker .. automodule:: aiogram.types.sticker :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/sticker_set.rst b/docs2/api/types/sticker_set.rst index 19e2ae99..a25e064f 100644 --- a/docs2/api/types/sticker_set.rst +++ b/docs2/api/types/sticker_set.rst @@ -6,4 +6,4 @@ StickerSet .. automodule:: aiogram.types.sticker_set :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/successful_payment.rst b/docs2/api/types/successful_payment.rst index 10ec78b1..f21f860b 100644 --- a/docs2/api/types/successful_payment.rst +++ b/docs2/api/types/successful_payment.rst @@ -6,4 +6,4 @@ SuccessfulPayment .. automodule:: aiogram.types.successful_payment :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/update.rst b/docs2/api/types/update.rst index c8338f19..5419da6e 100644 --- a/docs2/api/types/update.rst +++ b/docs2/api/types/update.rst @@ -6,4 +6,4 @@ Update .. automodule:: aiogram.types.update :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/user.rst b/docs2/api/types/user.rst index 5c58898d..b13f8808 100644 --- a/docs2/api/types/user.rst +++ b/docs2/api/types/user.rst @@ -6,4 +6,4 @@ User .. automodule:: aiogram.types.user :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/user_profile_photos.rst b/docs2/api/types/user_profile_photos.rst index 7a6876b4..b6cce934 100644 --- a/docs2/api/types/user_profile_photos.rst +++ b/docs2/api/types/user_profile_photos.rst @@ -6,4 +6,4 @@ UserProfilePhotos .. automodule:: aiogram.types.user_profile_photos :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/venue.rst b/docs2/api/types/venue.rst index 2621755b..75a71fff 100644 --- a/docs2/api/types/venue.rst +++ b/docs2/api/types/venue.rst @@ -6,4 +6,4 @@ Venue .. automodule:: aiogram.types.venue :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/video.rst b/docs2/api/types/video.rst index 30d29917..0478b3f7 100644 --- a/docs2/api/types/video.rst +++ b/docs2/api/types/video.rst @@ -6,4 +6,4 @@ Video .. automodule:: aiogram.types.video :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/video_note.rst b/docs2/api/types/video_note.rst index a436faa8..b9d308e5 100644 --- a/docs2/api/types/video_note.rst +++ b/docs2/api/types/video_note.rst @@ -6,4 +6,4 @@ VideoNote .. automodule:: aiogram.types.video_note :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/voice.rst b/docs2/api/types/voice.rst index 29c44ea6..7d58722d 100644 --- a/docs2/api/types/voice.rst +++ b/docs2/api/types/voice.rst @@ -6,4 +6,4 @@ Voice .. automodule:: aiogram.types.voice :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/api/types/voice_chat_ended.rst b/docs2/api/types/voice_chat_ended.rst new file mode 100644 index 00000000..cce70b7c --- /dev/null +++ b/docs2/api/types/voice_chat_ended.rst @@ -0,0 +1,9 @@ +############## +VoiceChatEnded +############## + + +.. automodule:: aiogram.types.voice_chat_ended + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs2/api/types/voice_chat_participants_invited.rst b/docs2/api/types/voice_chat_participants_invited.rst new file mode 100644 index 00000000..89a94fa9 --- /dev/null +++ b/docs2/api/types/voice_chat_participants_invited.rst @@ -0,0 +1,9 @@ +############################ +VoiceChatParticipantsInvited +############################ + + +.. automodule:: aiogram.types.voice_chat_participants_invited + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs2/api/types/voice_chat_started.rst b/docs2/api/types/voice_chat_started.rst new file mode 100644 index 00000000..c1a1964b --- /dev/null +++ b/docs2/api/types/voice_chat_started.rst @@ -0,0 +1,9 @@ +################ +VoiceChatStarted +################ + + +.. automodule:: aiogram.types.voice_chat_started + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs2/api/types/webhook_info.rst b/docs2/api/types/webhook_info.rst index 0491c68d..259a01bc 100644 --- a/docs2/api/types/webhook_info.rst +++ b/docs2/api/types/webhook_info.rst @@ -6,4 +6,4 @@ WebhookInfo .. automodule:: aiogram.types.webhook_info :members: :member-order: bysource - :undoc-members: True \ No newline at end of file + :undoc-members: True diff --git a/docs2/dispatcher/class_based_handlers/index.rst b/docs2/dispatcher/class_based_handlers/index.rst index 094b127f..4de831ed 100644 --- a/docs2/dispatcher/class_based_handlers/index.rst +++ b/docs2/dispatcher/class_based_handlers/index.rst @@ -20,3 +20,4 @@ There are some base class based handlers what you need to use in your own handle poll pre_checkout_query shipping_query + chat_member diff --git a/pyproject.toml b/pyproject.toml index a27f8059..0c7a8df6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "aiogram" -version = "3.0.0-alpha.6" +version = "3.0.0-alpha.7" description = "Modern and fully asynchronous framework for Telegram Bot API" authors = ["Alex Root Junior "] license = "MIT"