From ef912d21efd3d44e2a7181fe701aca79bd1b1c70 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sun, 12 May 2019 19:49:06 +0200 Subject: [PATCH] Use more concise and cleaner description of a method and a type --- pyrogram/client/client.py | 22 +++++++++---------- pyrogram/client/filters/filters.py | 2 +- .../methods/bots/answer_callback_query.py | 2 +- .../methods/bots/answer_inline_query.py | 2 +- .../methods/bots/get_game_high_scores.py | 2 +- .../methods/bots/get_inline_bot_results.py | 2 +- .../methods/bots/request_callback_answer.py | 2 +- pyrogram/client/methods/bots/send_game.py | 2 +- .../methods/bots/send_inline_bot_result.py | 2 +- .../client/methods/bots/set_game_score.py | 2 +- .../client/methods/chats/delete_chat_photo.py | 2 +- .../methods/chats/export_chat_invite_link.py | 2 +- pyrogram/client/methods/chats/get_chat.py | 2 +- .../client/methods/chats/get_chat_member.py | 2 +- .../client/methods/chats/get_chat_members.py | 2 +- .../methods/chats/get_chat_members_count.py | 2 +- .../client/methods/chats/get_chat_preview.py | 2 +- pyrogram/client/methods/chats/get_dialogs.py | 2 +- .../client/methods/chats/get_dialogs_count.py | 2 +- .../client/methods/chats/iter_chat_members.py | 2 +- pyrogram/client/methods/chats/iter_dialogs.py | 2 +- pyrogram/client/methods/chats/join_chat.py | 2 +- .../client/methods/chats/kick_chat_member.py | 2 +- pyrogram/client/methods/chats/leave_chat.py | 2 +- .../client/methods/chats/pin_chat_message.py | 2 +- .../methods/chats/promote_chat_member.py | 2 +- .../client/methods/chats/restrict_chat.py | 2 +- .../methods/chats/restrict_chat_member.py | 2 +- .../methods/chats/set_chat_description.py | 2 +- .../client/methods/chats/set_chat_photo.py | 2 +- .../client/methods/chats/set_chat_title.py | 2 +- .../client/methods/chats/unban_chat_member.py | 2 +- .../methods/chats/unpin_chat_message.py | 2 +- .../methods/chats/update_chat_username.py | 2 +- .../client/methods/contacts/add_contacts.py | 2 +- .../methods/contacts/delete_contacts.py | 2 +- .../client/methods/contacts/get_contacts.py | 2 +- .../methods/contacts/get_contacts_count.py | 2 +- .../methods/messages/delete_messages.py | 2 +- .../client/methods/messages/download_media.py | 2 +- .../methods/messages/edit_message_caption.py | 2 +- .../methods/messages/edit_message_media.py | 2 +- .../messages/edit_message_reply_markup.py | 2 +- .../methods/messages/edit_message_text.py | 2 +- .../methods/messages/forward_messages.py | 2 +- .../client/methods/messages/get_history.py | 2 +- .../methods/messages/get_history_count.py | 2 +- .../client/methods/messages/get_messages.py | 2 +- .../client/methods/messages/iter_history.py | 2 +- .../client/methods/messages/retract_vote.py | 2 +- .../client/methods/messages/send_animation.py | 2 +- .../client/methods/messages/send_audio.py | 2 +- .../methods/messages/send_cached_media.py | 2 +- .../methods/messages/send_chat_action.py | 2 +- .../client/methods/messages/send_contact.py | 2 +- .../client/methods/messages/send_document.py | 2 +- .../client/methods/messages/send_location.py | 2 +- .../methods/messages/send_media_group.py | 2 +- .../client/methods/messages/send_message.py | 2 +- .../client/methods/messages/send_photo.py | 2 +- pyrogram/client/methods/messages/send_poll.py | 2 +- .../client/methods/messages/send_sticker.py | 2 +- .../client/methods/messages/send_venue.py | 2 +- .../client/methods/messages/send_video.py | 2 +- .../methods/messages/send_video_note.py | 2 +- .../client/methods/messages/send_voice.py | 2 +- pyrogram/client/methods/messages/stop_poll.py | 2 +- pyrogram/client/methods/messages/vote_poll.py | 2 +- .../methods/password/change_cloud_password.py | 2 +- .../methods/password/enable_cloud_password.py | 2 +- .../methods/password/remove_cloud_password.py | 2 +- .../users/delete_user_profile_photos.py | 2 +- pyrogram/client/methods/users/get_me.py | 2 +- .../methods/users/get_user_profile_photos.py | 2 +- .../users/get_user_profile_photos_count.py | 2 +- pyrogram/client/methods/users/get_users.py | 2 +- .../methods/users/set_user_profile_photo.py | 2 +- .../client/methods/users/update_username.py | 2 +- .../client/types/inline_mode/inline_query.py | 3 ++- .../types/inline_mode/inline_query_result.py | 2 +- .../inline_query_result_article.py | 2 +- .../client/types/input_media/input_media.py | 4 +++- .../input_media/input_media_animation.py | 2 +- .../types/input_media/input_media_audio.py | 3 ++- .../types/input_media/input_media_document.py | 2 +- .../types/input_media/input_media_photo.py | 2 +- .../types/input_media/input_media_video.py | 2 +- .../types/input_media/input_phone_contact.py | 2 +- .../input_message_content.py | 2 +- .../input_text_message_content.py | 2 +- .../client/types/keyboards/callback_game.py | 2 +- .../client/types/keyboards/callback_query.py | 3 ++- .../client/types/keyboards/force_reply.py | 4 +++- .../client/types/keyboards/game_high_score.py | 2 +- .../types/keyboards/game_high_scores.py | 2 +- .../types/keyboards/inline_keyboard_button.py | 4 +++- .../types/keyboards/inline_keyboard_markup.py | 2 +- .../client/types/keyboards/keyboard_button.py | 2 +- .../types/keyboards/reply_keyboard_markup.py | 2 +- .../types/keyboards/reply_keyboard_remove.py | 9 +++++--- .../types/messages_and_media/animation.py | 2 +- .../client/types/messages_and_media/audio.py | 2 +- .../types/messages_and_media/contact.py | 2 +- .../types/messages_and_media/document.py | 2 +- .../client/types/messages_and_media/game.py | 2 +- .../types/messages_and_media/location.py | 2 +- .../types/messages_and_media/message.py | 2 +- .../messages_and_media/message_entity.py | 2 +- .../types/messages_and_media/messages.py | 2 +- .../client/types/messages_and_media/photo.py | 2 +- .../types/messages_and_media/photo_size.py | 2 +- .../client/types/messages_and_media/poll.py | 2 +- .../types/messages_and_media/poll_option.py | 2 +- .../types/messages_and_media/sticker.py | 2 +- .../messages_and_media/user_profile_photos.py | 2 +- .../client/types/messages_and_media/venue.py | 2 +- .../client/types/messages_and_media/video.py | 2 +- .../types/messages_and_media/video_note.py | 2 +- .../client/types/messages_and_media/voice.py | 2 +- pyrogram/client/types/user_and_chats/chat.py | 2 +- .../types/user_and_chats/chat_member.py | 2 +- .../types/user_and_chats/chat_members.py | 2 +- .../types/user_and_chats/chat_permissions.py | 2 +- .../client/types/user_and_chats/chat_photo.py | 2 +- .../types/user_and_chats/chat_preview.py | 2 +- .../client/types/user_and_chats/dialog.py | 2 +- .../client/types/user_and_chats/dialogs.py | 2 +- pyrogram/client/types/user_and_chats/user.py | 2 +- .../types/user_and_chats/user_status.py | 2 +- 129 files changed, 153 insertions(+), 141 deletions(-) diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index 24373ce1..f65ef231 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -261,7 +261,7 @@ class Client(Methods, BaseClient): self._proxy.update(value) def start(self): - """Use this method to start the Client. + """Start the Client. Raises: RPCError: In case of a Telegram RPC error. @@ -354,7 +354,7 @@ class Client(Methods, BaseClient): return self def stop(self): - """Use this method to stop the Client. + """Stop the Client. Raises: ConnectionError: In case you try to stop an already stopped Client. @@ -396,7 +396,7 @@ class Client(Methods, BaseClient): return self def restart(self): - """Use this method to restart the Client. + """Restart the Client. Raises: ConnectionError: In case you try to restart a stopped Client. @@ -405,7 +405,7 @@ class Client(Methods, BaseClient): self.start() def idle(self, stop_signals: tuple = (SIGINT, SIGTERM, SIGABRT)): - """Use this method to block the main script execution until a signal (e.g.: from CTRL+C) is received. + """Block the main script execution until a signal (e.g.: from CTRL+C) is received. Once the signal is received, the client will automatically stop and the main script will continue its execution. This is used after starting one or more clients and is useful for event-driven applications only, that are, @@ -438,7 +438,7 @@ class Client(Methods, BaseClient): self.stop() def run(self): - """Use this method to start the Client and automatically idle the main script. + """Start the Client and automatically idle the main script. This is a convenience method that literally just calls :meth:`start` and :meth:`idle`. It makes running a client less verbose, but is not suitable in case you want to run more than one client in a single main script, @@ -451,7 +451,7 @@ class Client(Methods, BaseClient): self.idle() def add_handler(self, handler: Handler, group: int = 0): - """Use this method to register an update handler. + """Register an update handler. You can register multiple handlers, but at most one handler within a group will be used for a single update. To handle the same update more than once, register @@ -475,7 +475,7 @@ class Client(Methods, BaseClient): return handler, group def remove_handler(self, handler: Handler, group: int = 0): - """Use this method to remove a previously-registered update handler. + """Remove a previously-registered update handler. Make sure to provide the right group that the handler was added in. You can use the return value of the :meth:`add_handler` method, a tuple of (handler, group), and @@ -494,7 +494,7 @@ class Client(Methods, BaseClient): self.dispatcher.remove_handler(handler, group) def stop_transmission(self): - """Use this method to stop downloading or uploading a file. + """Stop downloading or uploading a file. Must be called inside a progress callback function. """ raise Client.StopTransmission @@ -1036,7 +1036,7 @@ class Client(Methods, BaseClient): log.debug("{} stopped".format(name)) def send(self, data: Object, retries: int = Session.MAX_RETRIES, timeout: float = Session.WAIT_TIMEOUT): - """Use this method to send raw Telegram queries. + """Send raw Telegram queries. This method makes it possible to manually call every single Telegram API method in a low-level manner. Available functions are listed in the :obj:`functions ` package and may accept compound @@ -1341,7 +1341,7 @@ class Client(Methods, BaseClient): self.get_initial_dialogs_chunk() def resolve_peer(self, peer_id: Union[int, str]): - """Use this method to get the InputPeer of a known peer id. + """Get the InputPeer of a known peer id. Useful whenever an InputPeer type is required. .. note:: @@ -1423,7 +1423,7 @@ class Client(Methods, BaseClient): progress: callable = None, progress_args: tuple = () ): - """Use this method to upload a file onto Telegram servers, without actually sending the message to anyone. + """Upload a file onto Telegram servers, without actually sending the message to anyone. Useful whenever an InputFile type is required. .. note:: diff --git a/pyrogram/client/filters/filters.py b/pyrogram/client/filters/filters.py index 5070bd52..2117ec6e 100644 --- a/pyrogram/client/filters/filters.py +++ b/pyrogram/client/filters/filters.py @@ -23,7 +23,7 @@ from ..types.keyboards import InlineKeyboardMarkup, ReplyKeyboardMarkup def create(name: str, func: callable, **kwargs) -> type: - """Use this method to create a Filter. + """Create a Filter. Custom filters give you extra control over which updates are allowed or not to be processed by your handlers. diff --git a/pyrogram/client/methods/bots/answer_callback_query.py b/pyrogram/client/methods/bots/answer_callback_query.py index 12effe47..010c29ea 100644 --- a/pyrogram/client/methods/bots/answer_callback_query.py +++ b/pyrogram/client/methods/bots/answer_callback_query.py @@ -29,7 +29,7 @@ class AnswerCallbackQuery(BaseClient): url: str = None, cache_time: int = 0 ): - """Use this method to send answers to callback queries sent from inline keyboards. + """Send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. Parameters: diff --git a/pyrogram/client/methods/bots/answer_inline_query.py b/pyrogram/client/methods/bots/answer_inline_query.py index 7a1b14c8..62344f20 100644 --- a/pyrogram/client/methods/bots/answer_inline_query.py +++ b/pyrogram/client/methods/bots/answer_inline_query.py @@ -34,7 +34,7 @@ class AnswerInlineQuery(BaseClient): switch_pm_text: str = "", switch_pm_parameter: str = "" ): - """Use this method to send answers to an inline query. + """Send answers to an inline query. No more than 50 results per query are allowed. Parameters: diff --git a/pyrogram/client/methods/bots/get_game_high_scores.py b/pyrogram/client/methods/bots/get_game_high_scores.py index 64901fea..e1472b9e 100644 --- a/pyrogram/client/methods/bots/get_game_high_scores.py +++ b/pyrogram/client/methods/bots/get_game_high_scores.py @@ -30,7 +30,7 @@ class GetGameHighScores(BaseClient): chat_id: Union[int, str], message_id: int = None ) -> "pyrogram.GameHighScores": - """Use this method to get data for high score tables. + """Get data for high score tables. Parameters: user_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/bots/get_inline_bot_results.py b/pyrogram/client/methods/bots/get_inline_bot_results.py index 14628b64..307238e3 100644 --- a/pyrogram/client/methods/bots/get_inline_bot_results.py +++ b/pyrogram/client/methods/bots/get_inline_bot_results.py @@ -32,7 +32,7 @@ class GetInlineBotResults(BaseClient): latitude: float = None, longitude: float = None ): - """Use this method to get bot results via inline queries. + """Get bot results via inline queries. You can then send a result using :obj:`send_inline_bot_result ` Parameters: diff --git a/pyrogram/client/methods/bots/request_callback_answer.py b/pyrogram/client/methods/bots/request_callback_answer.py index 7e57b39b..443cb825 100644 --- a/pyrogram/client/methods/bots/request_callback_answer.py +++ b/pyrogram/client/methods/bots/request_callback_answer.py @@ -30,7 +30,7 @@ class RequestCallbackAnswer(BaseClient): callback_data: bytes, timeout: int = 10 ): - """Use this method to request a callback answer from bots. + """Request a callback answer from bots. This is the equivalent of clicking an inline button containing callback data. Parameters: diff --git a/pyrogram/client/methods/bots/send_game.py b/pyrogram/client/methods/bots/send_game.py index 03593a56..c10d328a 100644 --- a/pyrogram/client/methods/bots/send_game.py +++ b/pyrogram/client/methods/bots/send_game.py @@ -37,7 +37,7 @@ class SendGame(BaseClient): "pyrogram.ForceReply" ] = None ) -> "pyrogram.Message": - """Use this method to send a game. + """Send a game. Parameters: chat_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/bots/send_inline_bot_result.py b/pyrogram/client/methods/bots/send_inline_bot_result.py index 49dc11ee..031591db 100644 --- a/pyrogram/client/methods/bots/send_inline_bot_result.py +++ b/pyrogram/client/methods/bots/send_inline_bot_result.py @@ -32,7 +32,7 @@ class SendInlineBotResult(BaseClient): reply_to_message_id: int = None, hide_via: bool = None ): - """Use this method to send an inline bot result. + """Send an inline bot result. Bot results can be retrieved using :obj:`get_inline_bot_results ` Parameters: diff --git a/pyrogram/client/methods/bots/set_game_score.py b/pyrogram/client/methods/bots/set_game_score.py index f5658542..3b0e97e2 100644 --- a/pyrogram/client/methods/bots/set_game_score.py +++ b/pyrogram/client/methods/bots/set_game_score.py @@ -34,7 +34,7 @@ class SetGameScore(BaseClient): message_id: int = None ): # inline_message_id: str = None): TODO Add inline_message_id - """Use this method to set the score of the specified user in a game. + """Set the score of the specified user in a game. Parameters: user_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/chats/delete_chat_photo.py b/pyrogram/client/methods/chats/delete_chat_photo.py index f45a7dc2..88d97506 100644 --- a/pyrogram/client/methods/chats/delete_chat_photo.py +++ b/pyrogram/client/methods/chats/delete_chat_photo.py @@ -27,7 +27,7 @@ class DeleteChatPhoto(BaseClient): self, chat_id: Union[int, str] ) -> bool: - """Use this method to delete a chat photo. + """Delete a chat photo. Photos can't be changed for private chats. You must be an administrator in the chat for this to work and must have the appropriate admin rights. diff --git a/pyrogram/client/methods/chats/export_chat_invite_link.py b/pyrogram/client/methods/chats/export_chat_invite_link.py index e1ca27c2..a223a000 100644 --- a/pyrogram/client/methods/chats/export_chat_invite_link.py +++ b/pyrogram/client/methods/chats/export_chat_invite_link.py @@ -27,7 +27,7 @@ class ExportChatInviteLink(BaseClient): self, chat_id: Union[int, str] ) -> str: - """Use this method to generate a new invite link for a chat; any previously generated link is revoked. + """Generate a new invite link for a chat; any previously generated link is revoked. You must be an administrator in the chat for this to work and have the appropriate admin rights. diff --git a/pyrogram/client/methods/chats/get_chat.py b/pyrogram/client/methods/chats/get_chat.py index bf4c4cea..96bc9eaf 100644 --- a/pyrogram/client/methods/chats/get_chat.py +++ b/pyrogram/client/methods/chats/get_chat.py @@ -28,7 +28,7 @@ class GetChat(BaseClient): self, chat_id: Union[int, str] ) -> "pyrogram.Chat": - """Use this method to get up to date information about the chat. + """Get up to date information about the chat. Information include current name of the user for one-on-one conversations, current username of a user, group or channel, etc. diff --git a/pyrogram/client/methods/chats/get_chat_member.py b/pyrogram/client/methods/chats/get_chat_member.py index b625e32f..c77e46b6 100644 --- a/pyrogram/client/methods/chats/get_chat_member.py +++ b/pyrogram/client/methods/chats/get_chat_member.py @@ -30,7 +30,7 @@ class GetChatMember(BaseClient): chat_id: Union[int, str], user_id: Union[int, str] ) -> "pyrogram.ChatMember": - """Use this method to get information about one member of a chat. + """Get information about one member of a chat. Parameters: chat_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/chats/get_chat_members.py b/pyrogram/client/methods/chats/get_chat_members.py index 79001614..10f76dcf 100644 --- a/pyrogram/client/methods/chats/get_chat_members.py +++ b/pyrogram/client/methods/chats/get_chat_members.py @@ -46,7 +46,7 @@ class GetChatMembers(BaseClient): query: str = "", filter: str = Filters.ALL ) -> "pyrogram.ChatMembers": - """Use this method to get a chunk of the members list of a chat. + """Get a chunk of the members list of a chat. You can get up to 200 chat members at once. A chat can be either a basic group, a supergroup or a channel. diff --git a/pyrogram/client/methods/chats/get_chat_members_count.py b/pyrogram/client/methods/chats/get_chat_members_count.py index d40585f5..c8bd6deb 100644 --- a/pyrogram/client/methods/chats/get_chat_members_count.py +++ b/pyrogram/client/methods/chats/get_chat_members_count.py @@ -27,7 +27,7 @@ class GetChatMembersCount(BaseClient): self, chat_id: Union[int, str] ) -> int: - """Use this method to get the number of members in a chat. + """Get the number of members in a chat. Parameters: chat_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/chats/get_chat_preview.py b/pyrogram/client/methods/chats/get_chat_preview.py index fd00c374..8551aaf4 100644 --- a/pyrogram/client/methods/chats/get_chat_preview.py +++ b/pyrogram/client/methods/chats/get_chat_preview.py @@ -26,7 +26,7 @@ class GetChatPreview(BaseClient): self, invite_link: str ): - """Use this method to get the preview of a chat using the invite link. + """Get the preview of a chat using the invite link. This method only returns a chat preview, if you want to join a chat use :meth:`join_chat` diff --git a/pyrogram/client/methods/chats/get_dialogs.py b/pyrogram/client/methods/chats/get_dialogs.py index 83732d07..605ee782 100644 --- a/pyrogram/client/methods/chats/get_dialogs.py +++ b/pyrogram/client/methods/chats/get_dialogs.py @@ -34,7 +34,7 @@ class GetDialogs(BaseClient): limit: int = 100, pinned_only: bool = False ) -> "pyrogram.Dialogs": - """Use this method to get a chunk of the user's dialogs. + """Get a chunk of the user's dialogs. You can get up to 100 dialogs at once. For a more convenient way of getting a user's dialogs see :meth:`iter_dialogs`. diff --git a/pyrogram/client/methods/chats/get_dialogs_count.py b/pyrogram/client/methods/chats/get_dialogs_count.py index eea327da..1a307433 100644 --- a/pyrogram/client/methods/chats/get_dialogs_count.py +++ b/pyrogram/client/methods/chats/get_dialogs_count.py @@ -22,7 +22,7 @@ from ...ext import BaseClient class GetDialogsCount(BaseClient): def get_dialogs_count(self, pinned_only: bool = False) -> int: - """Use this method to get the total count of your dialogs. + """Get the total count of your dialogs. pinned_only (``bool``, *optional*): Pass True if you want to count only pinned dialogs. diff --git a/pyrogram/client/methods/chats/iter_chat_members.py b/pyrogram/client/methods/chats/iter_chat_members.py index f735da48..330eed7b 100644 --- a/pyrogram/client/methods/chats/iter_chat_members.py +++ b/pyrogram/client/methods/chats/iter_chat_members.py @@ -45,7 +45,7 @@ class IterChatMembers(BaseClient): query: str = "", filter: str = Filters.ALL ) -> Generator["pyrogram.ChatMember", None, None]: - """Use this method to iterate through the members of a chat sequentially. + """Iterate through the members of a chat sequentially. This convenience method does the same as repeatedly calling :meth:`get_chat_members` in a loop, thus saving you from the hassle of setting up boilerplate code. It is useful for getting the whole members list of a chat with diff --git a/pyrogram/client/methods/chats/iter_dialogs.py b/pyrogram/client/methods/chats/iter_dialogs.py index 6fc9f81c..1209a5df 100644 --- a/pyrogram/client/methods/chats/iter_dialogs.py +++ b/pyrogram/client/methods/chats/iter_dialogs.py @@ -28,7 +28,7 @@ class IterDialogs(BaseClient): offset_date: int = 0, limit: int = 0 ) -> Generator["pyrogram.Dialog", None, None]: - """Use this method to iterate through a user's dialogs sequentially. + """Iterate through a user's dialogs sequentially. This convenience method does the same as repeatedly calling :meth:`get_dialogs` in a loop, thus saving you from the hassle of setting up boilerplate code. It is useful for getting the whole dialogs list with a single call. diff --git a/pyrogram/client/methods/chats/join_chat.py b/pyrogram/client/methods/chats/join_chat.py index 77b2ee50..ed6c69ce 100644 --- a/pyrogram/client/methods/chats/join_chat.py +++ b/pyrogram/client/methods/chats/join_chat.py @@ -26,7 +26,7 @@ class JoinChat(BaseClient): self, chat_id: str ): - """Use this method to join a group chat or channel. + """Join a group chat or channel. Parameters: chat_id (``str``): diff --git a/pyrogram/client/methods/chats/kick_chat_member.py b/pyrogram/client/methods/chats/kick_chat_member.py index dbd095ad..f5058829 100644 --- a/pyrogram/client/methods/chats/kick_chat_member.py +++ b/pyrogram/client/methods/chats/kick_chat_member.py @@ -30,7 +30,7 @@ class KickChatMember(BaseClient): user_id: Union[int, str], until_date: int = 0 ) -> Union["pyrogram.Message", bool]: - """Use this method to kick a user from a group, a supergroup or a channel. + """Kick a user from a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first. You must be an administrator in the chat for this to work and must have the appropriate admin rights. diff --git a/pyrogram/client/methods/chats/leave_chat.py b/pyrogram/client/methods/chats/leave_chat.py index 57cc1090..3ed6f10f 100644 --- a/pyrogram/client/methods/chats/leave_chat.py +++ b/pyrogram/client/methods/chats/leave_chat.py @@ -28,7 +28,7 @@ class LeaveChat(BaseClient): chat_id: Union[int, str], delete: bool = False ): - """Use this method to leave a group chat or channel. + """Leave a group chat or channel. Parameters: chat_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/chats/pin_chat_message.py b/pyrogram/client/methods/chats/pin_chat_message.py index 2c485dab..efb41e67 100644 --- a/pyrogram/client/methods/chats/pin_chat_message.py +++ b/pyrogram/client/methods/chats/pin_chat_message.py @@ -29,7 +29,7 @@ class PinChatMessage(BaseClient): message_id: int, disable_notification: bool = None ) -> bool: - """Use this method to pin a message in a group, channel or your own chat. + """Pin a message in a group, channel or your own chat. You must be an administrator in the chat for this to work and must have the "can_pin_messages" admin right in the supergroup or "can_edit_messages" admin right in the channel. diff --git a/pyrogram/client/methods/chats/promote_chat_member.py b/pyrogram/client/methods/chats/promote_chat_member.py index 0b93576a..700b3a68 100644 --- a/pyrogram/client/methods/chats/promote_chat_member.py +++ b/pyrogram/client/methods/chats/promote_chat_member.py @@ -36,7 +36,7 @@ class PromoteChatMember(BaseClient): can_pin_messages: bool = False, can_promote_members: bool = False ) -> bool: - """Use this method to promote or demote a user in a supergroup or a channel. + """Promote or demote a user in a supergroup or a channel. You must be an administrator in the chat for this to work and must have the appropriate admin rights. Pass False for all boolean parameters to demote a user. diff --git a/pyrogram/client/methods/chats/restrict_chat.py b/pyrogram/client/methods/chats/restrict_chat.py index 9f6d2910..8e63a9b2 100644 --- a/pyrogram/client/methods/chats/restrict_chat.py +++ b/pyrogram/client/methods/chats/restrict_chat.py @@ -36,7 +36,7 @@ class RestrictChat(BaseClient): can_invite_users: bool = False, can_pin_messages: bool = False ) -> Chat: - """Use this method to restrict a chat. + """Restrict a chat. Pass True for all boolean parameters to lift restrictions from a chat. Parameters: diff --git a/pyrogram/client/methods/chats/restrict_chat_member.py b/pyrogram/client/methods/chats/restrict_chat_member.py index 1f31d8eb..96e07d18 100644 --- a/pyrogram/client/methods/chats/restrict_chat_member.py +++ b/pyrogram/client/methods/chats/restrict_chat_member.py @@ -38,7 +38,7 @@ class RestrictChatMember(BaseClient): can_invite_users: bool = False, can_pin_messages: bool = False ) -> Chat: - """Use this method to restrict a user in a supergroup. + """Restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate admin rights. Pass True for all boolean parameters to lift restrictions from a user. diff --git a/pyrogram/client/methods/chats/set_chat_description.py b/pyrogram/client/methods/chats/set_chat_description.py index 6cc3bbd3..68bf9fa2 100644 --- a/pyrogram/client/methods/chats/set_chat_description.py +++ b/pyrogram/client/methods/chats/set_chat_description.py @@ -28,7 +28,7 @@ class SetChatDescription(BaseClient): chat_id: Union[int, str], description: str ) -> bool: - """Use this method to change the description of a supergroup or a channel. + """Change the description of a supergroup or a channel. You must be an administrator in the chat for this to work and must have the appropriate admin rights. Parameters: diff --git a/pyrogram/client/methods/chats/set_chat_photo.py b/pyrogram/client/methods/chats/set_chat_photo.py index 7248a265..4a2f6cf1 100644 --- a/pyrogram/client/methods/chats/set_chat_photo.py +++ b/pyrogram/client/methods/chats/set_chat_photo.py @@ -31,7 +31,7 @@ class SetChatPhoto(BaseClient): chat_id: Union[int, str], photo: str ) -> bool: - """Use this method to set a new profile photo for the chat. + """Set a new profile photo for the chat. Photos can't be changed for private chats. You must be an administrator in the chat for this to work and must have the appropriate admin rights. diff --git a/pyrogram/client/methods/chats/set_chat_title.py b/pyrogram/client/methods/chats/set_chat_title.py index a159d2cc..f70fa5da 100644 --- a/pyrogram/client/methods/chats/set_chat_title.py +++ b/pyrogram/client/methods/chats/set_chat_title.py @@ -28,7 +28,7 @@ class SetChatTitle(BaseClient): chat_id: Union[int, str], title: str ) -> bool: - """Use this method to change the title of a chat. + """Change the title of a chat. Titles can't be changed for private chats. You must be an administrator in the chat for this to work and must have the appropriate admin rights. diff --git a/pyrogram/client/methods/chats/unban_chat_member.py b/pyrogram/client/methods/chats/unban_chat_member.py index 35ea0343..7e4205c9 100644 --- a/pyrogram/client/methods/chats/unban_chat_member.py +++ b/pyrogram/client/methods/chats/unban_chat_member.py @@ -28,7 +28,7 @@ class UnbanChatMember(BaseClient): chat_id: Union[int, str], user_id: Union[int, str] ) -> bool: - """Use this method to unban a previously kicked user in a supergroup or channel. + """Unban a previously kicked user in a supergroup or channel. The user will **not** return to the group or channel automatically, but will be able to join via link, etc. You must be an administrator for this to work. diff --git a/pyrogram/client/methods/chats/unpin_chat_message.py b/pyrogram/client/methods/chats/unpin_chat_message.py index 4e2531fd..22639315 100644 --- a/pyrogram/client/methods/chats/unpin_chat_message.py +++ b/pyrogram/client/methods/chats/unpin_chat_message.py @@ -27,7 +27,7 @@ class UnpinChatMessage(BaseClient): self, chat_id: Union[int, str] ) -> bool: - """Use this method to unpin a message in a group, channel or your own chat. + """Unpin a message in a group, channel or your own chat. You must be an administrator in the chat for this to work and must have the "can_pin_messages" admin right in the supergroup or "can_edit_messages" admin right in the channel. diff --git a/pyrogram/client/methods/chats/update_chat_username.py b/pyrogram/client/methods/chats/update_chat_username.py index 2e8adb05..de5015ea 100644 --- a/pyrogram/client/methods/chats/update_chat_username.py +++ b/pyrogram/client/methods/chats/update_chat_username.py @@ -28,7 +28,7 @@ class UpdateChatUsername(BaseClient): chat_id: Union[int, str], username: Union[str, None] ) -> bool: - """Use this method to update a channel or a supergroup username. + """Update a channel or a supergroup username. To update your own username (for users only, not bots) you can use :meth:`update_username`. diff --git a/pyrogram/client/methods/contacts/add_contacts.py b/pyrogram/client/methods/contacts/add_contacts.py index aa8e1fd5..c7e647b0 100644 --- a/pyrogram/client/methods/contacts/add_contacts.py +++ b/pyrogram/client/methods/contacts/add_contacts.py @@ -28,7 +28,7 @@ class AddContacts(BaseClient): self, contacts: List["pyrogram.InputPhoneContact"] ): - """Use this method to add contacts to your Telegram address book. + """Add contacts to your Telegram address book. Parameters: contacts (List of :obj:`InputPhoneContact`): diff --git a/pyrogram/client/methods/contacts/delete_contacts.py b/pyrogram/client/methods/contacts/delete_contacts.py index db5b9df1..7a5ecf55 100644 --- a/pyrogram/client/methods/contacts/delete_contacts.py +++ b/pyrogram/client/methods/contacts/delete_contacts.py @@ -28,7 +28,7 @@ class DeleteContacts(BaseClient): self, ids: List[int] ): - """Use this method to delete contacts from your Telegram address book. + """Delete contacts from your Telegram address book. Parameters: ids (List of ``int``): diff --git a/pyrogram/client/methods/contacts/get_contacts.py b/pyrogram/client/methods/contacts/get_contacts.py index 7e607e77..1fa5b738 100644 --- a/pyrogram/client/methods/contacts/get_contacts.py +++ b/pyrogram/client/methods/contacts/get_contacts.py @@ -30,7 +30,7 @@ log = logging.getLogger(__name__) class GetContacts(BaseClient): def get_contacts(self) -> List["pyrogram.User"]: - """Use this method to get contacts from your Telegram address book. + """Get contacts from your Telegram address book. Returns: List of :obj:`User`: On success, a list of users is returned. diff --git a/pyrogram/client/methods/contacts/get_contacts_count.py b/pyrogram/client/methods/contacts/get_contacts_count.py index b9e6f6c4..01fb0789 100644 --- a/pyrogram/client/methods/contacts/get_contacts_count.py +++ b/pyrogram/client/methods/contacts/get_contacts_count.py @@ -22,7 +22,7 @@ from ...ext import BaseClient class GetContactsCount(BaseClient): def get_contacts_count(self) -> int: - """Use this method to get the total count of contacts from your Telegram address book. + """Get the total count of contacts from your Telegram address book. Returns: ``int``: On success, an integer is returned. diff --git a/pyrogram/client/methods/messages/delete_messages.py b/pyrogram/client/methods/messages/delete_messages.py index 067d2fae..3667c8ee 100644 --- a/pyrogram/client/methods/messages/delete_messages.py +++ b/pyrogram/client/methods/messages/delete_messages.py @@ -29,7 +29,7 @@ class DeleteMessages(BaseClient): message_ids: Iterable[int], revoke: bool = True ) -> bool: - """Use this method to delete messages, including service messages. + """Delete messages, including service messages. Parameters: chat_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/messages/download_media.py b/pyrogram/client/methods/messages/download_media.py index 04a5ec57..5c440173 100644 --- a/pyrogram/client/methods/messages/download_media.py +++ b/pyrogram/client/methods/messages/download_media.py @@ -32,7 +32,7 @@ class DownloadMedia(BaseClient): progress: callable = None, progress_args: tuple = () ) -> Union[str, None]: - """Use this method to download the media from a message. + """Download the media from a message. Parameters: message (:obj:`Message` | ``str``): diff --git a/pyrogram/client/methods/messages/edit_message_caption.py b/pyrogram/client/methods/messages/edit_message_caption.py index fe19dcc9..cfe5b236 100644 --- a/pyrogram/client/methods/messages/edit_message_caption.py +++ b/pyrogram/client/methods/messages/edit_message_caption.py @@ -32,7 +32,7 @@ class EditMessageCaption(BaseClient): parse_mode: str = "", reply_markup: "pyrogram.InlineKeyboardMarkup" = None ) -> "pyrogram.Message": - """Use this method to edit captions of messages. + """Edit captions of messages. Parameters: chat_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/messages/edit_message_media.py b/pyrogram/client/methods/messages/edit_message_media.py index b03fb1e0..b15daa9b 100644 --- a/pyrogram/client/methods/messages/edit_message_media.py +++ b/pyrogram/client/methods/messages/edit_message_media.py @@ -40,7 +40,7 @@ class EditMessageMedia(BaseClient): media: InputMedia, reply_markup: "pyrogram.InlineKeyboardMarkup" = None ) -> "pyrogram.Message": - """Use this method to edit audio, document, photo, or video messages. + """Edit audio, document, photo, or video messages. If a message is a part of a message album, then it can be edited only to a photo or a video. Otherwise, message type can be changed arbitrarily. When inline message is edited, new file can't be uploaded. diff --git a/pyrogram/client/methods/messages/edit_message_reply_markup.py b/pyrogram/client/methods/messages/edit_message_reply_markup.py index 73561451..8d2b82af 100644 --- a/pyrogram/client/methods/messages/edit_message_reply_markup.py +++ b/pyrogram/client/methods/messages/edit_message_reply_markup.py @@ -30,7 +30,7 @@ class EditMessageReplyMarkup(BaseClient): message_id: int, reply_markup: "pyrogram.InlineKeyboardMarkup" = None ) -> "pyrogram.Message": - """Use this method to edit only the reply markup of messages sent by the bot or via the bot (for inline bots). + """Edit only the reply markup of messages sent by the bot or via the bot (for inline bots). Parameters: chat_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/messages/edit_message_text.py b/pyrogram/client/methods/messages/edit_message_text.py index 30b58b68..69283e89 100644 --- a/pyrogram/client/methods/messages/edit_message_text.py +++ b/pyrogram/client/methods/messages/edit_message_text.py @@ -33,7 +33,7 @@ class EditMessageText(BaseClient): disable_web_page_preview: bool = None, reply_markup: "pyrogram.InlineKeyboardMarkup" = None ) -> "pyrogram.Message": - """Use this method to edit text messages. + """Edit text messages. Parameters: chat_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/messages/forward_messages.py b/pyrogram/client/methods/messages/forward_messages.py index 08cc48ea..a3e161fb 100644 --- a/pyrogram/client/methods/messages/forward_messages.py +++ b/pyrogram/client/methods/messages/forward_messages.py @@ -33,7 +33,7 @@ class ForwardMessages(BaseClient): as_copy: bool = False, remove_caption: bool = False ) -> "pyrogram.Messages": - """Use this method to forward messages of any kind. + """Forward messages of any kind. Parameters: chat_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/messages/get_history.py b/pyrogram/client/methods/messages/get_history.py index ffd8f9e0..3933e729 100644 --- a/pyrogram/client/methods/messages/get_history.py +++ b/pyrogram/client/methods/messages/get_history.py @@ -38,7 +38,7 @@ class GetHistory(BaseClient): offset_date: int = 0, reverse: bool = False ) -> "pyrogram.Messages": - """Use this method to retrieve a chunk of the history of a chat. + """Retrieve a chunk of the history of a chat. You can get up to 100 messages at once. For a more convenient way of getting a chat history see :meth:`iter_history`. diff --git a/pyrogram/client/methods/messages/get_history_count.py b/pyrogram/client/methods/messages/get_history_count.py index b4812d26..ced46799 100644 --- a/pyrogram/client/methods/messages/get_history_count.py +++ b/pyrogram/client/methods/messages/get_history_count.py @@ -32,7 +32,7 @@ class GetHistoryCount(BaseClient): self, chat_id: Union[int, str] ) -> int: - """Use this method to get the total count of messages in a chat. + """Get the total count of messages in a chat. .. note:: diff --git a/pyrogram/client/methods/messages/get_messages.py b/pyrogram/client/methods/messages/get_messages.py index 391c251c..51f71352 100644 --- a/pyrogram/client/methods/messages/get_messages.py +++ b/pyrogram/client/methods/messages/get_messages.py @@ -36,7 +36,7 @@ class GetMessages(BaseClient): reply_to_message_ids: Union[int, Iterable[int]] = None, replies: int = 1 ) -> Union["pyrogram.Message", "pyrogram.Messages"]: - """Use this method to get one or more messages that belong to a specific chat. + """Get one or more messages that belong to a specific chat. You can retrieve up to 200 messages at once. Parameters: diff --git a/pyrogram/client/methods/messages/iter_history.py b/pyrogram/client/methods/messages/iter_history.py index b1546318..218dd7f5 100644 --- a/pyrogram/client/methods/messages/iter_history.py +++ b/pyrogram/client/methods/messages/iter_history.py @@ -32,7 +32,7 @@ class IterHistory(BaseClient): offset_date: int = 0, reverse: bool = False ) -> Generator["pyrogram.Message", None, None]: - """Use this method to iterate through a chat history sequentially. + """Iterate through a chat history sequentially. This convenience method does the same as repeatedly calling :meth:`get_history` in a loop, thus saving you from the hassle of setting up boilerplate code. It is useful for getting the whole chat history with a single call. diff --git a/pyrogram/client/methods/messages/retract_vote.py b/pyrogram/client/methods/messages/retract_vote.py index 929298df..b52181a6 100644 --- a/pyrogram/client/methods/messages/retract_vote.py +++ b/pyrogram/client/methods/messages/retract_vote.py @@ -29,7 +29,7 @@ class RetractVote(BaseClient): chat_id: Union[int, str], message_id: int ) -> "pyrogram.Poll": - """Use this method to retract your vote in a poll. + """Retract your vote in a poll. Parameters: chat_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/messages/send_animation.py b/pyrogram/client/methods/messages/send_animation.py index 4e21e56c..461ef6fc 100644 --- a/pyrogram/client/methods/messages/send_animation.py +++ b/pyrogram/client/methods/messages/send_animation.py @@ -49,7 +49,7 @@ class SendAnimation(BaseClient): progress: callable = None, progress_args: tuple = () ) -> Union["pyrogram.Message", None]: - """Use this method to send animation files (animation or H.264/MPEG-4 AVC video without sound). + """Send animation files (animation or H.264/MPEG-4 AVC video without sound). Parameters: chat_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/messages/send_audio.py b/pyrogram/client/methods/messages/send_audio.py index 71458c33..aaa5a529 100644 --- a/pyrogram/client/methods/messages/send_audio.py +++ b/pyrogram/client/methods/messages/send_audio.py @@ -49,7 +49,7 @@ class SendAudio(BaseClient): progress: callable = None, progress_args: tuple = () ) -> Union["pyrogram.Message", None]: - """Use this method to send audio files. + """Send audio files. For sending voice messages, use the :obj:`send_voice()` method instead. diff --git a/pyrogram/client/methods/messages/send_cached_media.py b/pyrogram/client/methods/messages/send_cached_media.py index b0b3fc4e..9f66e5fd 100644 --- a/pyrogram/client/methods/messages/send_cached_media.py +++ b/pyrogram/client/methods/messages/send_cached_media.py @@ -42,7 +42,7 @@ class SendCachedMedia(BaseClient): "pyrogram.ForceReply" ] = None ) -> Union["pyrogram.Message", None]: - """Use this method to send any media stored on the Telegram servers using a file_id. + """Send any media stored on the Telegram servers using a file_id. This convenience method works with any valid file_id only. It does the same as calling the relevant method for sending media using a file_id, thus saving you from the diff --git a/pyrogram/client/methods/messages/send_chat_action.py b/pyrogram/client/methods/messages/send_chat_action.py index 1d819747..ac55c633 100644 --- a/pyrogram/client/methods/messages/send_chat_action.py +++ b/pyrogram/client/methods/messages/send_chat_action.py @@ -44,7 +44,7 @@ POSSIBLE_VALUES = list(map(lambda x: x.lower(), filter(lambda x: not x.startswit class SendChatAction(BaseClient): def send_chat_action(self, chat_id: Union[int, str], action: str) -> bool: - """Use this method when you need to tell the other party that something is happening on your side. + """Tell the other party that something is happening on your side. Parameters: chat_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/messages/send_contact.py b/pyrogram/client/methods/messages/send_contact.py index 27df6505..d0b6fb58 100644 --- a/pyrogram/client/methods/messages/send_contact.py +++ b/pyrogram/client/methods/messages/send_contact.py @@ -40,7 +40,7 @@ class SendContact(BaseClient): "pyrogram.ForceReply" ] = None ) -> "pyrogram.Message": - """Use this method to send phone contacts. + """Send phone contacts. Parameters: chat_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/messages/send_document.py b/pyrogram/client/methods/messages/send_document.py index e2ac0d23..e966a11a 100644 --- a/pyrogram/client/methods/messages/send_document.py +++ b/pyrogram/client/methods/messages/send_document.py @@ -46,7 +46,7 @@ class SendDocument(BaseClient): progress: callable = None, progress_args: tuple = () ) -> Union["pyrogram.Message", None]: - """Use this method to send general files. + """Send general files. Parameters: chat_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/messages/send_location.py b/pyrogram/client/methods/messages/send_location.py index dce6671b..2e3681e6 100644 --- a/pyrogram/client/methods/messages/send_location.py +++ b/pyrogram/client/methods/messages/send_location.py @@ -38,7 +38,7 @@ class SendLocation(BaseClient): "pyrogram.ForceReply" ] = None ) -> "pyrogram.Message": - """Use this method to send points on the map. + """Send points on the map. Parameters: chat_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/messages/send_media_group.py b/pyrogram/client/methods/messages/send_media_group.py index fe6725f0..0af94cf9 100644 --- a/pyrogram/client/methods/messages/send_media_group.py +++ b/pyrogram/client/methods/messages/send_media_group.py @@ -41,7 +41,7 @@ class SendMediaGroup(BaseClient): disable_notification: bool = None, reply_to_message_id: int = None ): - """Use this method to send a group of photos or videos as an album. + """Send a group of photos or videos as an album. Parameters: chat_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/messages/send_message.py b/pyrogram/client/methods/messages/send_message.py index 15c1487a..f8caa081 100644 --- a/pyrogram/client/methods/messages/send_message.py +++ b/pyrogram/client/methods/messages/send_message.py @@ -39,7 +39,7 @@ class SendMessage(BaseClient): "pyrogram.ForceReply" ] = None ) -> "pyrogram.Message": - """Use this method to send text messages. + """Send text messages. Parameters: chat_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/messages/send_photo.py b/pyrogram/client/methods/messages/send_photo.py index 5487761e..7c4f688f 100644 --- a/pyrogram/client/methods/messages/send_photo.py +++ b/pyrogram/client/methods/messages/send_photo.py @@ -46,7 +46,7 @@ class SendPhoto(BaseClient): progress: callable = None, progress_args: tuple = () ) -> Union["pyrogram.Message", None]: - """Use this method to send photos. + """Send photos. Parameters: chat_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/messages/send_poll.py b/pyrogram/client/methods/messages/send_poll.py index ff5c8533..4dae53b2 100644 --- a/pyrogram/client/methods/messages/send_poll.py +++ b/pyrogram/client/methods/messages/send_poll.py @@ -38,7 +38,7 @@ class SendPoll(BaseClient): "pyrogram.ForceReply" ] = None ) -> "pyrogram.Message": - """Use this method to send a new poll. + """Send a new poll. Parameters: chat_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/messages/send_sticker.py b/pyrogram/client/methods/messages/send_sticker.py index 0e314641..cabe3487 100644 --- a/pyrogram/client/methods/messages/send_sticker.py +++ b/pyrogram/client/methods/messages/send_sticker.py @@ -43,7 +43,7 @@ class SendSticker(BaseClient): progress: callable = None, progress_args: tuple = () ) -> Union["pyrogram.Message", None]: - """Use this method to send .webp stickers. + """Send .webp stickers. Parameters: chat_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/messages/send_venue.py b/pyrogram/client/methods/messages/send_venue.py index 1045bdbd..35545c9b 100644 --- a/pyrogram/client/methods/messages/send_venue.py +++ b/pyrogram/client/methods/messages/send_venue.py @@ -42,7 +42,7 @@ class SendVenue(BaseClient): "pyrogram.ForceReply" ] = None ) -> "pyrogram.Message": - """Use this method to send information about a venue. + """Send information about a venue. Parameters: chat_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/messages/send_video.py b/pyrogram/client/methods/messages/send_video.py index baa91d29..92066e19 100644 --- a/pyrogram/client/methods/messages/send_video.py +++ b/pyrogram/client/methods/messages/send_video.py @@ -50,7 +50,7 @@ class SendVideo(BaseClient): progress: callable = None, progress_args: tuple = () ) -> Union["pyrogram.Message", None]: - """Use this method to send video files. + """Send video files. Parameters: chat_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/messages/send_video_note.py b/pyrogram/client/methods/messages/send_video_note.py index 9f934efe..8886c588 100644 --- a/pyrogram/client/methods/messages/send_video_note.py +++ b/pyrogram/client/methods/messages/send_video_note.py @@ -46,7 +46,7 @@ class SendVideoNote(BaseClient): progress: callable = None, progress_args: tuple = () ) -> Union["pyrogram.Message", None]: - """Use this method to send video messages. + """Send video messages. Parameters: chat_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/messages/send_voice.py b/pyrogram/client/methods/messages/send_voice.py index e7ec2b11..3631d828 100644 --- a/pyrogram/client/methods/messages/send_voice.py +++ b/pyrogram/client/methods/messages/send_voice.py @@ -46,7 +46,7 @@ class SendVoice(BaseClient): progress: callable = None, progress_args: tuple = () ) -> Union["pyrogram.Message", None]: - """Use this method to send audio files. + """Send audio files. Parameters: chat_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/messages/stop_poll.py b/pyrogram/client/methods/messages/stop_poll.py index 4179cce4..6abe6791 100644 --- a/pyrogram/client/methods/messages/stop_poll.py +++ b/pyrogram/client/methods/messages/stop_poll.py @@ -30,7 +30,7 @@ class StopPoll(BaseClient): message_id: int, reply_markup: "pyrogram.InlineKeyboardMarkup" = None ) -> "pyrogram.Poll": - """Use this method to stop a poll which was sent by you. + """Stop a poll which was sent by you. Stopped polls can't be reopened and nobody will be able to vote in it anymore. diff --git a/pyrogram/client/methods/messages/vote_poll.py b/pyrogram/client/methods/messages/vote_poll.py index 5e7b8ce8..a5d77d86 100644 --- a/pyrogram/client/methods/messages/vote_poll.py +++ b/pyrogram/client/methods/messages/vote_poll.py @@ -30,7 +30,7 @@ class VotePoll(BaseClient): message_id: id, option: int ) -> "pyrogram.Poll": - """Use this method to vote a poll. + """Vote a poll. Parameters: chat_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/password/change_cloud_password.py b/pyrogram/client/methods/password/change_cloud_password.py index b9ee37d5..a33b83c7 100644 --- a/pyrogram/client/methods/password/change_cloud_password.py +++ b/pyrogram/client/methods/password/change_cloud_password.py @@ -30,7 +30,7 @@ class ChangeCloudPassword(BaseClient): new_password: str, new_hint: str = "" ) -> bool: - """Use this method to change your Two-Step Verification password (Cloud Password) with a new one. + """Change your Two-Step Verification password (Cloud Password) with a new one. Parameters: current_password (``str``): diff --git a/pyrogram/client/methods/password/enable_cloud_password.py b/pyrogram/client/methods/password/enable_cloud_password.py index e2e05633..23ee1608 100644 --- a/pyrogram/client/methods/password/enable_cloud_password.py +++ b/pyrogram/client/methods/password/enable_cloud_password.py @@ -30,7 +30,7 @@ class EnableCloudPassword(BaseClient): hint: str = "", email: str = None ) -> bool: - """Use this method to enable the Two-Step Verification security feature (Cloud Password) on your account. + """Enable the Two-Step Verification security feature (Cloud Password) on your account. This password will be asked when you log-in on a new device in addition to the SMS code. diff --git a/pyrogram/client/methods/password/remove_cloud_password.py b/pyrogram/client/methods/password/remove_cloud_password.py index 37160530..9dcbb005 100644 --- a/pyrogram/client/methods/password/remove_cloud_password.py +++ b/pyrogram/client/methods/password/remove_cloud_password.py @@ -26,7 +26,7 @@ class RemoveCloudPassword(BaseClient): self, password: str ) -> bool: - """Use this method to turn off the Two-Step Verification security feature (Cloud Password) on your account. + """Turn off the Two-Step Verification security feature (Cloud Password) on your account. Parameters: password (``str``): diff --git a/pyrogram/client/methods/users/delete_user_profile_photos.py b/pyrogram/client/methods/users/delete_user_profile_photos.py index 4e962245..305fd554 100644 --- a/pyrogram/client/methods/users/delete_user_profile_photos.py +++ b/pyrogram/client/methods/users/delete_user_profile_photos.py @@ -29,7 +29,7 @@ class DeleteUserProfilePhotos(BaseClient): self, id: Union[str, List[str]] ) -> bool: - """Use this method to delete your own profile photos. + """Delete your own profile photos. Parameters: id (``str`` | ``list``): diff --git a/pyrogram/client/methods/users/get_me.py b/pyrogram/client/methods/users/get_me.py index 03d3cdf1..44f16af3 100644 --- a/pyrogram/client/methods/users/get_me.py +++ b/pyrogram/client/methods/users/get_me.py @@ -23,7 +23,7 @@ from ...ext import BaseClient class GetMe(BaseClient): def get_me(self) -> "pyrogram.User": - """A simple method for testing your authorization. Requires no parameters. + """Get your own user identity. Returns: :obj:`User`: Basic information about the user or bot. diff --git a/pyrogram/client/methods/users/get_user_profile_photos.py b/pyrogram/client/methods/users/get_user_profile_photos.py index 41dd2593..ab58dbec 100644 --- a/pyrogram/client/methods/users/get_user_profile_photos.py +++ b/pyrogram/client/methods/users/get_user_profile_photos.py @@ -30,7 +30,7 @@ class GetUserProfilePhotos(BaseClient): offset: int = 0, limit: int = 100 ) -> "pyrogram.UserProfilePhotos": - """Use this method to get a list of profile pictures for a user. + """Get a list of profile pictures for a user. Parameters: user_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/users/get_user_profile_photos_count.py b/pyrogram/client/methods/users/get_user_profile_photos_count.py index 595352c3..f5526584 100644 --- a/pyrogram/client/methods/users/get_user_profile_photos_count.py +++ b/pyrogram/client/methods/users/get_user_profile_photos_count.py @@ -24,7 +24,7 @@ from ...ext import BaseClient class GetUserProfilePhotosCount(BaseClient): def get_user_profile_photos_count(self, user_id: Union[int, str]) -> int: - """Use this method to get the total count of profile pictures for a user. + """Get the total count of profile pictures for a user. Parameters: user_id (``int`` | ``str``): diff --git a/pyrogram/client/methods/users/get_users.py b/pyrogram/client/methods/users/get_users.py index bbcdebae..e95fedc7 100644 --- a/pyrogram/client/methods/users/get_users.py +++ b/pyrogram/client/methods/users/get_users.py @@ -28,7 +28,7 @@ class GetUsers(BaseClient): self, user_ids: Union[Iterable[Union[int, str]], int, str] ) -> Union["pyrogram.User", List["pyrogram.User"]]: - """Use this method to get information about a user. + """Get information about a user. You can retrieve up to 200 users at once. Parameters: diff --git a/pyrogram/client/methods/users/set_user_profile_photo.py b/pyrogram/client/methods/users/set_user_profile_photo.py index e873cf40..bc056466 100644 --- a/pyrogram/client/methods/users/set_user_profile_photo.py +++ b/pyrogram/client/methods/users/set_user_profile_photo.py @@ -25,7 +25,7 @@ class SetUserProfilePhoto(BaseClient): self, photo: str ) -> bool: - """Use this method to set a new profile photo. + """Set a new profile photo. This method only works for Users. Bots profile photos must be set using BotFather. diff --git a/pyrogram/client/methods/users/update_username.py b/pyrogram/client/methods/users/update_username.py index 8b5b37ae..65b86174 100644 --- a/pyrogram/client/methods/users/update_username.py +++ b/pyrogram/client/methods/users/update_username.py @@ -27,7 +27,7 @@ class UpdateUsername(BaseClient): self, username: Union[str, None] ) -> bool: - """Use this method to update your own username. + """Update your own username. This method only works for users, not bots. Bot usernames must be changed via Bot Support or by recreating them from scratch using BotFather. To update a channel or supergroup username you can use diff --git a/pyrogram/client/types/inline_mode/inline_query.py b/pyrogram/client/types/inline_mode/inline_query.py index a5190452..ab546b5e 100644 --- a/pyrogram/client/types/inline_mode/inline_query.py +++ b/pyrogram/client/types/inline_mode/inline_query.py @@ -28,7 +28,8 @@ from ..user_and_chats import User class InlineQuery(PyrogramType, Update): - """This object represents an incoming inline query. + """An incoming inline query. + When the user sends an empty query, your bot could return some default or trending results. Parameters: diff --git a/pyrogram/client/types/inline_mode/inline_query_result.py b/pyrogram/client/types/inline_mode/inline_query_result.py index 3e7fcb02..c9a46ff2 100644 --- a/pyrogram/client/types/inline_mode/inline_query_result.py +++ b/pyrogram/client/types/inline_mode/inline_query_result.py @@ -40,7 +40,7 @@ from ..pyrogram_type import PyrogramType class InlineQueryResult(PyrogramType): - """This object represents one result of an inline query. + """One result of an inline query. Pyrogram currently supports results of the following 20 types: diff --git a/pyrogram/client/types/inline_mode/inline_query_result_article.py b/pyrogram/client/types/inline_mode/inline_query_result_article.py index bc0b4e20..8543eb4c 100644 --- a/pyrogram/client/types/inline_mode/inline_query_result_article.py +++ b/pyrogram/client/types/inline_mode/inline_query_result_article.py @@ -23,7 +23,7 @@ from .inline_query_result import InlineQueryResult class InlineQueryResultArticle(InlineQueryResult): - """Represents a link to an article or web page. + """Link to an article or web page. TODO: Hide url? diff --git a/pyrogram/client/types/input_media/input_media.py b/pyrogram/client/types/input_media/input_media.py index 1e0fbc01..551ca639 100644 --- a/pyrogram/client/types/input_media/input_media.py +++ b/pyrogram/client/types/input_media/input_media.py @@ -20,7 +20,9 @@ from ..pyrogram_type import PyrogramType class InputMedia(PyrogramType): - """This object represents the content of a media message to be sent. It should be one of: + """Content of a media message to be sent. + + It should be one of: - :obj:`InputMediaAnimation` - :obj:`InputMediaDocument` diff --git a/pyrogram/client/types/input_media/input_media_animation.py b/pyrogram/client/types/input_media/input_media_animation.py index 177bd9ad..23fcb967 100644 --- a/pyrogram/client/types/input_media/input_media_animation.py +++ b/pyrogram/client/types/input_media/input_media_animation.py @@ -20,7 +20,7 @@ from . import InputMedia class InputMediaAnimation(InputMedia): - """This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent. + """An animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent inside an album. Parameters: media (``str``): diff --git a/pyrogram/client/types/input_media/input_media_audio.py b/pyrogram/client/types/input_media/input_media_audio.py index 152532fa..3fb45d8f 100644 --- a/pyrogram/client/types/input_media/input_media_audio.py +++ b/pyrogram/client/types/input_media/input_media_audio.py @@ -20,7 +20,8 @@ from . import InputMedia class InputMediaAudio(InputMedia): - """This object represents an audio to be sent inside an album. + """An audio to be sent inside an album. + It is intended to be used with :obj:`send_media_group() `. Parameters: diff --git a/pyrogram/client/types/input_media/input_media_document.py b/pyrogram/client/types/input_media/input_media_document.py index 046b731c..0de8dedf 100644 --- a/pyrogram/client/types/input_media/input_media_document.py +++ b/pyrogram/client/types/input_media/input_media_document.py @@ -20,7 +20,7 @@ from . import InputMedia class InputMediaDocument(InputMedia): - """This object represents a general file to be sent. + """A generic file to be sent inside an album. Parameters: media (``str``): diff --git a/pyrogram/client/types/input_media/input_media_photo.py b/pyrogram/client/types/input_media/input_media_photo.py index 2797bd5f..ce134af2 100644 --- a/pyrogram/client/types/input_media/input_media_photo.py +++ b/pyrogram/client/types/input_media/input_media_photo.py @@ -20,7 +20,7 @@ from . import InputMedia class InputMediaPhoto(InputMedia): - """This object represents a photo to be sent inside an album. + """A photo to be sent inside an album. It is intended to be used with :obj:`send_media_group() `. Parameters: diff --git a/pyrogram/client/types/input_media/input_media_video.py b/pyrogram/client/types/input_media/input_media_video.py index 319973de..9764dd1a 100644 --- a/pyrogram/client/types/input_media/input_media_video.py +++ b/pyrogram/client/types/input_media/input_media_video.py @@ -20,7 +20,7 @@ from . import InputMedia class InputMediaVideo(InputMedia): - """This object represents a video to be sent inside an album. + """A video to be sent inside an album. It is intended to be used with :obj:`send_media_group() `. Parameters: diff --git a/pyrogram/client/types/input_media/input_phone_contact.py b/pyrogram/client/types/input_media/input_phone_contact.py index 02189011..0b6353b7 100644 --- a/pyrogram/client/types/input_media/input_phone_contact.py +++ b/pyrogram/client/types/input_media/input_phone_contact.py @@ -22,7 +22,7 @@ from ..pyrogram_type import PyrogramType class InputPhoneContact(PyrogramType): - """This object represents a Phone Contact to be added in your Telegram address book. + """A Phone Contact to be added in your Telegram address book. It is intended to be used with :meth:`add_contacts() ` Parameters: diff --git a/pyrogram/client/types/input_message_content/input_message_content.py b/pyrogram/client/types/input_message_content/input_message_content.py index f3e238b8..0cd264b7 100644 --- a/pyrogram/client/types/input_message_content/input_message_content.py +++ b/pyrogram/client/types/input_message_content/input_message_content.py @@ -24,7 +24,7 @@ from ..pyrogram_type import PyrogramType class InputMessageContent(PyrogramType): - """This object represents the content of a message to be sent as a result of an inline query. + """Content of a message to be sent as a result of an inline query. Pyrogram currently supports the following 4 types: diff --git a/pyrogram/client/types/input_message_content/input_text_message_content.py b/pyrogram/client/types/input_message_content/input_text_message_content.py index feedd298..4b294aab 100644 --- a/pyrogram/client/types/input_message_content/input_text_message_content.py +++ b/pyrogram/client/types/input_message_content/input_text_message_content.py @@ -22,7 +22,7 @@ from ...style import HTML, Markdown class InputTextMessageContent(InputMessageContent): - """This object represents the content of a text message to be sent as the result of an inline query. + """Content of a text message to be sent as the result of an inline query. Parameters: message_text (``str``): diff --git a/pyrogram/client/types/keyboards/callback_game.py b/pyrogram/client/types/keyboards/callback_game.py index fc2d9884..b7397075 100644 --- a/pyrogram/client/types/keyboards/callback_game.py +++ b/pyrogram/client/types/keyboards/callback_game.py @@ -20,7 +20,7 @@ from ..pyrogram_type import PyrogramType class CallbackGame(PyrogramType): - """A placeholder, currently holds no information. + """Placeholder, currently holds no information. Use BotFather to set up your game. """ diff --git a/pyrogram/client/types/keyboards/callback_query.py b/pyrogram/client/types/keyboards/callback_query.py index 61bbfe40..e58f77c2 100644 --- a/pyrogram/client/types/keyboards/callback_query.py +++ b/pyrogram/client/types/keyboards/callback_query.py @@ -27,7 +27,8 @@ from ..user_and_chats import User class CallbackQuery(PyrogramType, Update): - """This object represents an incoming callback query from a callback button in an inline keyboard. + """An incoming callback query from a callback button in an inline keyboard. + If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present. diff --git a/pyrogram/client/types/keyboards/force_reply.py b/pyrogram/client/types/keyboards/force_reply.py index f48dab14..f2d337b6 100644 --- a/pyrogram/client/types/keyboards/force_reply.py +++ b/pyrogram/client/types/keyboards/force_reply.py @@ -21,7 +21,9 @@ from ..pyrogram_type import PyrogramType class ForceReply(PyrogramType): - """Upon receiving a message with this object, Telegram clients will display a reply interface to the user. + """Object used to force clients to show a reply interface. + + Upon receiving a message with this object, Telegram clients will display a reply interface to the user. This acts as if the user has selected the bot's message and tapped "Reply". This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to diff --git a/pyrogram/client/types/keyboards/game_high_score.py b/pyrogram/client/types/keyboards/game_high_score.py index 07db8e73..302decec 100644 --- a/pyrogram/client/types/keyboards/game_high_score.py +++ b/pyrogram/client/types/keyboards/game_high_score.py @@ -24,7 +24,7 @@ from pyrogram.client.types.user_and_chats import User class GameHighScore(PyrogramType): - """This object represents one row of the high scores table for a game. + """One row of the high scores table for a game. Parameters: user (:obj:`User`): diff --git a/pyrogram/client/types/keyboards/game_high_scores.py b/pyrogram/client/types/keyboards/game_high_scores.py index 36b14c0f..1c2cf105 100644 --- a/pyrogram/client/types/keyboards/game_high_scores.py +++ b/pyrogram/client/types/keyboards/game_high_scores.py @@ -25,7 +25,7 @@ from .game_high_score import GameHighScore class GameHighScores(PyrogramType): - """This object represents the high scores table for a game. + """The high scores table for a game. Parameters: total_count (``int``): diff --git a/pyrogram/client/types/keyboards/inline_keyboard_button.py b/pyrogram/client/types/keyboards/inline_keyboard_button.py index ea110f7f..358eae21 100644 --- a/pyrogram/client/types/keyboards/inline_keyboard_button.py +++ b/pyrogram/client/types/keyboards/inline_keyboard_button.py @@ -27,7 +27,9 @@ from ..pyrogram_type import PyrogramType class InlineKeyboardButton(PyrogramType): - """This object represents one button of an inline keyboard. You must use exactly one of the optional fields. + """One button of an inline keyboard. + + You must use exactly one of the optional fields. Parameters: text (``str``): diff --git a/pyrogram/client/types/keyboards/inline_keyboard_markup.py b/pyrogram/client/types/keyboards/inline_keyboard_markup.py index f48f4b8c..c940fa1a 100644 --- a/pyrogram/client/types/keyboards/inline_keyboard_markup.py +++ b/pyrogram/client/types/keyboards/inline_keyboard_markup.py @@ -24,7 +24,7 @@ from ..pyrogram_type import PyrogramType class InlineKeyboardMarkup(PyrogramType): - """This object represents an inline keyboard that appears right next to the message it belongs to. + """An inline keyboard that appears right next to the message it belongs to. Parameters: inline_keyboard (List of List of :obj:`InlineKeyboardButton`): diff --git a/pyrogram/client/types/keyboards/keyboard_button.py b/pyrogram/client/types/keyboards/keyboard_button.py index e0393e3d..405e37b5 100644 --- a/pyrogram/client/types/keyboards/keyboard_button.py +++ b/pyrogram/client/types/keyboards/keyboard_button.py @@ -22,7 +22,7 @@ from ..pyrogram_type import PyrogramType class KeyboardButton(PyrogramType): - """This object represents one button of the reply keyboard. + """One button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields are mutually exclusive. diff --git a/pyrogram/client/types/keyboards/reply_keyboard_markup.py b/pyrogram/client/types/keyboards/reply_keyboard_markup.py index 32c73c6b..85ab16f4 100644 --- a/pyrogram/client/types/keyboards/reply_keyboard_markup.py +++ b/pyrogram/client/types/keyboards/reply_keyboard_markup.py @@ -25,7 +25,7 @@ from ..pyrogram_type import PyrogramType class ReplyKeyboardMarkup(PyrogramType): - """This object represents a custom keyboard with reply options. + """A custom keyboard with reply options. Parameters: keyboard (List of List of :obj:`KeyboardButton`): diff --git a/pyrogram/client/types/keyboards/reply_keyboard_remove.py b/pyrogram/client/types/keyboards/reply_keyboard_remove.py index 560c89ee..bb448447 100644 --- a/pyrogram/client/types/keyboards/reply_keyboard_remove.py +++ b/pyrogram/client/types/keyboards/reply_keyboard_remove.py @@ -21,9 +21,12 @@ from ..pyrogram_type import PyrogramType class ReplyKeyboardRemove(PyrogramType): - """Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. - By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time - keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup). + """Object used to tell clients to remove a bot keyboard. + + Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display + the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. + An exception is made for one-time keyboards that are hidden immediately after the user presses a button + (see ReplyKeyboardMarkup). Parameters: selective (``bool``, *optional*): diff --git a/pyrogram/client/types/messages_and_media/animation.py b/pyrogram/client/types/messages_and_media/animation.py index 25dda78e..8d889cc2 100644 --- a/pyrogram/client/types/messages_and_media/animation.py +++ b/pyrogram/client/types/messages_and_media/animation.py @@ -26,7 +26,7 @@ from ...ext.utils import encode class Animation(PyrogramType): - """This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound). + """An animation file (GIF or H.264/MPEG-4 AVC video without sound). Parameters: file_id (``str``): diff --git a/pyrogram/client/types/messages_and_media/audio.py b/pyrogram/client/types/messages_and_media/audio.py index 9f024ee1..704f4f75 100644 --- a/pyrogram/client/types/messages_and_media/audio.py +++ b/pyrogram/client/types/messages_and_media/audio.py @@ -26,7 +26,7 @@ from ...ext.utils import encode class Audio(PyrogramType): - """This object represents an audio file to be treated as music by the Telegram clients. + """An audio file to be treated as music by the Telegram clients. Parameters: file_id (``str``): diff --git a/pyrogram/client/types/messages_and_media/contact.py b/pyrogram/client/types/messages_and_media/contact.py index e2fba707..fb4eb3a6 100644 --- a/pyrogram/client/types/messages_and_media/contact.py +++ b/pyrogram/client/types/messages_and_media/contact.py @@ -23,7 +23,7 @@ from ..pyrogram_type import PyrogramType class Contact(PyrogramType): - """This object represents a phone contact. + """A phone contact. Parameters: phone_number (``str``): diff --git a/pyrogram/client/types/messages_and_media/document.py b/pyrogram/client/types/messages_and_media/document.py index c4c8ab16..754fc5af 100644 --- a/pyrogram/client/types/messages_and_media/document.py +++ b/pyrogram/client/types/messages_and_media/document.py @@ -26,7 +26,7 @@ from ...ext.utils import encode class Document(PyrogramType): - """This object represents a general file (as opposed to photos, voice messages, audio files, ...). + """A generic file (as opposed to photos, voice messages, audio files, ...). Parameters: file_id (``str``): diff --git a/pyrogram/client/types/messages_and_media/game.py b/pyrogram/client/types/messages_and_media/game.py index 50268153..b4c96a11 100644 --- a/pyrogram/client/types/messages_and_media/game.py +++ b/pyrogram/client/types/messages_and_media/game.py @@ -24,7 +24,7 @@ from ..pyrogram_type import PyrogramType class Game(PyrogramType): - """This object represents a game. + """A game. Use BotFather to create and edit games, their short names will act as unique identifiers. Parameters: diff --git a/pyrogram/client/types/messages_and_media/location.py b/pyrogram/client/types/messages_and_media/location.py index 6af918f7..c3d8f974 100644 --- a/pyrogram/client/types/messages_and_media/location.py +++ b/pyrogram/client/types/messages_and_media/location.py @@ -23,7 +23,7 @@ from ..pyrogram_type import PyrogramType class Location(PyrogramType): - """This object represents a point on the map. + """A point on the map. Parameters: longitude (``float``): diff --git a/pyrogram/client/types/messages_and_media/message.py b/pyrogram/client/types/messages_and_media/message.py index a4d759c8..28a5d0ea 100644 --- a/pyrogram/client/types/messages_and_media/message.py +++ b/pyrogram/client/types/messages_and_media/message.py @@ -60,7 +60,7 @@ class Str(str): class Message(PyrogramType, Update): - """This object represents a message. + """A message. Parameters: message_id (``int``): diff --git a/pyrogram/client/types/messages_and_media/message_entity.py b/pyrogram/client/types/messages_and_media/message_entity.py index 6fe4ef91..768dee1e 100644 --- a/pyrogram/client/types/messages_and_media/message_entity.py +++ b/pyrogram/client/types/messages_and_media/message_entity.py @@ -24,7 +24,7 @@ from ..user_and_chats.user import User class MessageEntity(PyrogramType): - """This object represents one special entity in a text message. + """One special entity in a text message. For example, hashtags, usernames, URLs, etc. Parameters: diff --git a/pyrogram/client/types/messages_and_media/messages.py b/pyrogram/client/types/messages_and_media/messages.py index 4ce41aec..4f930a22 100644 --- a/pyrogram/client/types/messages_and_media/messages.py +++ b/pyrogram/client/types/messages_and_media/messages.py @@ -27,7 +27,7 @@ from ..user_and_chats import Chat class Messages(PyrogramType, Update): - """This object represents a chat's messages. + """Contains a chat's messages. Parameters: total_count (``int``): diff --git a/pyrogram/client/types/messages_and_media/photo.py b/pyrogram/client/types/messages_and_media/photo.py index f7f9f4ec..c2d0eb1f 100644 --- a/pyrogram/client/types/messages_and_media/photo.py +++ b/pyrogram/client/types/messages_and_media/photo.py @@ -28,7 +28,7 @@ from ...ext.utils import encode class Photo(PyrogramType): - """This object represents a Photo. + """A Photo. Parameters: id (``str``): diff --git a/pyrogram/client/types/messages_and_media/photo_size.py b/pyrogram/client/types/messages_and_media/photo_size.py index a154c077..c76ef914 100644 --- a/pyrogram/client/types/messages_and_media/photo_size.py +++ b/pyrogram/client/types/messages_and_media/photo_size.py @@ -26,7 +26,7 @@ from ..pyrogram_type import PyrogramType class PhotoSize(PyrogramType): - """This object represents one size of a photo or a file/sticker thumbnail. + """One size of a photo or a file/sticker thumbnail. Parameters: file_id (``str``): diff --git a/pyrogram/client/types/messages_and_media/poll.py b/pyrogram/client/types/messages_and_media/poll.py index 602da364..8aa32137 100644 --- a/pyrogram/client/types/messages_and_media/poll.py +++ b/pyrogram/client/types/messages_and_media/poll.py @@ -26,7 +26,7 @@ from ..update import Update class Poll(PyrogramType, Update): - """This object represents a Poll. + """A Poll. Parameters: id (``str``): diff --git a/pyrogram/client/types/messages_and_media/poll_option.py b/pyrogram/client/types/messages_and_media/poll_option.py index 31eed702..e594e3ca 100644 --- a/pyrogram/client/types/messages_and_media/poll_option.py +++ b/pyrogram/client/types/messages_and_media/poll_option.py @@ -21,7 +21,7 @@ from ..pyrogram_type import PyrogramType class PollOption(PyrogramType): - """This object contains information about one answer option in a poll. + """Contains information about one answer option in a poll. Parameters: text (``str``): diff --git a/pyrogram/client/types/messages_and_media/sticker.py b/pyrogram/client/types/messages_and_media/sticker.py index e6b8de35..0a3a42d1 100644 --- a/pyrogram/client/types/messages_and_media/sticker.py +++ b/pyrogram/client/types/messages_and_media/sticker.py @@ -28,7 +28,7 @@ from ...ext.utils import encode class Sticker(PyrogramType): - """This object represents a sticker. + """A sticker. Parameters: file_id (``str``): diff --git a/pyrogram/client/types/messages_and_media/user_profile_photos.py b/pyrogram/client/types/messages_and_media/user_profile_photos.py index 66bcb51a..c74a371b 100644 --- a/pyrogram/client/types/messages_and_media/user_profile_photos.py +++ b/pyrogram/client/types/messages_and_media/user_profile_photos.py @@ -24,7 +24,7 @@ from ..pyrogram_type import PyrogramType class UserProfilePhotos(PyrogramType): - """This object represents a user's profile pictures. + """Contains a user's profile pictures. Parameters: total_count (``int``): diff --git a/pyrogram/client/types/messages_and_media/venue.py b/pyrogram/client/types/messages_and_media/venue.py index 61e3d912..cac84e57 100644 --- a/pyrogram/client/types/messages_and_media/venue.py +++ b/pyrogram/client/types/messages_and_media/venue.py @@ -23,7 +23,7 @@ from ..pyrogram_type import PyrogramType class Venue(PyrogramType): - """This object represents a venue. + """A venue. Parameters: location (:obj:`Location`): diff --git a/pyrogram/client/types/messages_and_media/video.py b/pyrogram/client/types/messages_and_media/video.py index 8c3e9c00..13980270 100644 --- a/pyrogram/client/types/messages_and_media/video.py +++ b/pyrogram/client/types/messages_and_media/video.py @@ -26,7 +26,7 @@ from ...ext.utils import encode class Video(PyrogramType): - """This object represents a video file. + """A video file. Parameters: file_id (``str``): diff --git a/pyrogram/client/types/messages_and_media/video_note.py b/pyrogram/client/types/messages_and_media/video_note.py index 59c60c6e..5ebc8774 100644 --- a/pyrogram/client/types/messages_and_media/video_note.py +++ b/pyrogram/client/types/messages_and_media/video_note.py @@ -26,7 +26,7 @@ from ...ext.utils import encode class VideoNote(PyrogramType): - """This object represents a video note. + """A video note. Parameters: file_id (``str``): diff --git a/pyrogram/client/types/messages_and_media/voice.py b/pyrogram/client/types/messages_and_media/voice.py index 87804826..88154e2f 100644 --- a/pyrogram/client/types/messages_and_media/voice.py +++ b/pyrogram/client/types/messages_and_media/voice.py @@ -25,7 +25,7 @@ from ...ext.utils import encode class Voice(PyrogramType): - """This object represents a voice note. + """A voice note. Parameters: file_id (``str``): diff --git a/pyrogram/client/types/user_and_chats/chat.py b/pyrogram/client/types/user_and_chats/chat.py index 0c6210eb..3b5f242b 100644 --- a/pyrogram/client/types/user_and_chats/chat.py +++ b/pyrogram/client/types/user_and_chats/chat.py @@ -26,7 +26,7 @@ from ..pyrogram_type import PyrogramType class Chat(PyrogramType): - """This object represents a chat. + """A chat. Parameters: id (``int``): diff --git a/pyrogram/client/types/user_and_chats/chat_member.py b/pyrogram/client/types/user_and_chats/chat_member.py index 9841af83..9de9986a 100644 --- a/pyrogram/client/types/user_and_chats/chat_member.py +++ b/pyrogram/client/types/user_and_chats/chat_member.py @@ -23,7 +23,7 @@ from ..pyrogram_type import PyrogramType class ChatMember(PyrogramType): - """This object contains information about one member of a chat. + """Contains information about one member of a chat. Parameters: user (:obj:`User`): diff --git a/pyrogram/client/types/user_and_chats/chat_members.py b/pyrogram/client/types/user_and_chats/chat_members.py index d7cf3b9a..8f98277c 100644 --- a/pyrogram/client/types/user_and_chats/chat_members.py +++ b/pyrogram/client/types/user_and_chats/chat_members.py @@ -25,7 +25,7 @@ from ..pyrogram_type import PyrogramType class ChatMembers(PyrogramType): - """This object contains information about the members list of a chat. + """Contains information about the members list of a chat. Parameters: total_count (``int``): diff --git a/pyrogram/client/types/user_and_chats/chat_permissions.py b/pyrogram/client/types/user_and_chats/chat_permissions.py index ec00272e..6fa1a2a8 100644 --- a/pyrogram/client/types/user_and_chats/chat_permissions.py +++ b/pyrogram/client/types/user_and_chats/chat_permissions.py @@ -23,7 +23,7 @@ from ..pyrogram_type import PyrogramType class ChatPermissions(PyrogramType): - """This object represents both a chat default permissions and a single member permissions within a chat. + """A chat default permissions and a single member permissions within a chat. Some permissions make sense depending on the context: default chat permissions, restricted/kicked member or administrators in groups or channels. diff --git a/pyrogram/client/types/user_and_chats/chat_photo.py b/pyrogram/client/types/user_and_chats/chat_photo.py index af4f2df4..3f1f7cc6 100644 --- a/pyrogram/client/types/user_and_chats/chat_photo.py +++ b/pyrogram/client/types/user_and_chats/chat_photo.py @@ -25,7 +25,7 @@ from ...ext.utils import encode class ChatPhoto(PyrogramType): - """This object represents a chat photo. + """a chat photo. Parameters: small_file_id (``str``): diff --git a/pyrogram/client/types/user_and_chats/chat_preview.py b/pyrogram/client/types/user_and_chats/chat_preview.py index b6b136a1..880dcc8e 100644 --- a/pyrogram/client/types/user_and_chats/chat_preview.py +++ b/pyrogram/client/types/user_and_chats/chat_preview.py @@ -26,7 +26,7 @@ from ..user_and_chats.user import User class ChatPreview(PyrogramType): - """This object represents a chat preview. + """A chat preview. Parameters: title (``str``): diff --git a/pyrogram/client/types/user_and_chats/dialog.py b/pyrogram/client/types/user_and_chats/dialog.py index ec011d81..3dc09dbc 100644 --- a/pyrogram/client/types/user_and_chats/dialog.py +++ b/pyrogram/client/types/user_and_chats/dialog.py @@ -24,7 +24,7 @@ from ..user_and_chats import Chat class Dialog(PyrogramType): - """This object represents a dialog. + """A user's dialog. Parameters: chat (:obj:`Chat `): diff --git a/pyrogram/client/types/user_and_chats/dialogs.py b/pyrogram/client/types/user_and_chats/dialogs.py index 97ca462b..43b9f667 100644 --- a/pyrogram/client/types/user_and_chats/dialogs.py +++ b/pyrogram/client/types/user_and_chats/dialogs.py @@ -26,7 +26,7 @@ from ..pyrogram_type import PyrogramType class Dialogs(PyrogramType): - """This object represents a user's dialogs chunk. + """Contains a user's dialogs chunk. Parameters: total_count (``int``): diff --git a/pyrogram/client/types/user_and_chats/user.py b/pyrogram/client/types/user_and_chats/user.py index 976ce5a0..c5a0976c 100644 --- a/pyrogram/client/types/user_and_chats/user.py +++ b/pyrogram/client/types/user_and_chats/user.py @@ -24,7 +24,7 @@ from ..pyrogram_type import PyrogramType class User(PyrogramType): - """This object represents a Telegram user or bot. + """A Telegram user or bot. Parameters: id (``int``): diff --git a/pyrogram/client/types/user_and_chats/user_status.py b/pyrogram/client/types/user_and_chats/user_status.py index 0f9c003e..f91c2924 100644 --- a/pyrogram/client/types/user_and_chats/user_status.py +++ b/pyrogram/client/types/user_and_chats/user_status.py @@ -24,7 +24,7 @@ from ..update import Update class UserStatus(PyrogramType, Update): - """This object represents a User status (Last Seen privacy). + """A User status (Last Seen privacy). .. note::