From 06e657909170ac33057cee35699d5baea8123cbc Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Wed, 9 May 2018 13:04:02 +0200 Subject: [PATCH] Update some inconsistent docstrings --- pyrogram/client/methods/messages/get_messages.py | 2 +- pyrogram/client/methods/messages/text/send_message.py | 4 ++-- .../client/methods/messages/update/edit_message_caption.py | 4 ++-- .../methods/messages/update/edit_message_reply_markup.py | 2 +- pyrogram/client/methods/messages/update/edit_message_text.py | 4 ++-- pyrogram/client/methods/users/get_user_profile_photos.py | 5 ++++- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/pyrogram/client/methods/messages/get_messages.py b/pyrogram/client/methods/messages/get_messages.py index 3fcb0daa..cf972353 100644 --- a/pyrogram/client/methods/messages/get_messages.py +++ b/pyrogram/client/methods/messages/get_messages.py @@ -40,7 +40,7 @@ class GetMessages(BaseClient): Iterators and Generators are also accepted. replies (``int``, *optional*): - The number of replies to get for each message. Defaults to 1. + The number of subsequent replies to get for each message. Defaults to 1. Returns: On success and in case *message_ids* was a list, the returned value will be a list of the requested diff --git a/pyrogram/client/methods/messages/text/send_message.py b/pyrogram/client/methods/messages/text/send_message.py index 3016b432..d73e08be 100644 --- a/pyrogram/client/methods/messages/text/send_message.py +++ b/pyrogram/client/methods/messages/text/send_message.py @@ -42,7 +42,7 @@ class SendMessage(BaseClient): text (``str``): Text of the message to be sent. - parse_mode (``str``): + parse_mode (``str``, *optional*): Use :obj:`MARKDOWN ` or :obj:`HTML ` if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your message. Defaults to Markdown. @@ -54,7 +54,7 @@ class SendMessage(BaseClient): Sends the message silently. Users will receive a notification with no sound. - reply_to_message_id (``bool``, *optional*): + reply_to_message_id (``int``, *optional*): If the message is a reply, ID of the original message. reply_markup (:obj:`InlineKeyboardMarkup` | :obj:`ReplyKeyboardMarkup` | :obj:`ReplyKeyboardRemove` | :obj:`ForceReply`, *optional*): diff --git a/pyrogram/client/methods/messages/update/edit_message_caption.py b/pyrogram/client/methods/messages/update/edit_message_caption.py index 7833ed91..7ac7a56d 100644 --- a/pyrogram/client/methods/messages/update/edit_message_caption.py +++ b/pyrogram/client/methods/messages/update/edit_message_caption.py @@ -42,12 +42,12 @@ class EditMessageCaption(BaseClient): caption (``str``): New caption of the message. - parse_mode (``str``): + parse_mode (``str``, *optional*): Use :obj:`MARKDOWN ` or :obj:`HTML ` if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your caption. Defaults to Markdown. - reply_markup (:obj:`InlineKeyboardMarkup`): + reply_markup (:obj:`InlineKeyboardMarkup`, *optional*): An InlineKeyboardMarkup object. Returns: diff --git a/pyrogram/client/methods/messages/update/edit_message_reply_markup.py b/pyrogram/client/methods/messages/update/edit_message_reply_markup.py index 7e16c284..5f162ac5 100644 --- a/pyrogram/client/methods/messages/update/edit_message_reply_markup.py +++ b/pyrogram/client/methods/messages/update/edit_message_reply_markup.py @@ -37,7 +37,7 @@ class EditMessageReplyMarkup(BaseClient): message_id (``int``): Message identifier in the chat specified in chat_id. - reply_markup (:obj:`InlineKeyboardMarkup`): + reply_markup (:obj:`InlineKeyboardMarkup`, *optional*): An InlineKeyboardMarkup object. Returns: diff --git a/pyrogram/client/methods/messages/update/edit_message_text.py b/pyrogram/client/methods/messages/update/edit_message_text.py index 3ece21af..862f3ab3 100644 --- a/pyrogram/client/methods/messages/update/edit_message_text.py +++ b/pyrogram/client/methods/messages/update/edit_message_text.py @@ -43,7 +43,7 @@ class EditMessageText(BaseClient): text (``str``): New text of the message. - parse_mode (``str``): + parse_mode (``str``, *optional*): Use :obj:`MARKDOWN ` or :obj:`HTML ` if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your message. Defaults to Markdown. @@ -51,7 +51,7 @@ class EditMessageText(BaseClient): disable_web_page_preview (``bool``, *optional*): Disables link previews for links in this message. - reply_markup (:obj:`InlineKeyboardMarkup`): + reply_markup (:obj:`InlineKeyboardMarkup`, *optional*): An InlineKeyboardMarkup object. Returns: diff --git a/pyrogram/client/methods/users/get_user_profile_photos.py b/pyrogram/client/methods/users/get_user_profile_photos.py index aa16749d..42fb84bb 100644 --- a/pyrogram/client/methods/users/get_user_profile_photos.py +++ b/pyrogram/client/methods/users/get_user_profile_photos.py @@ -29,7 +29,10 @@ class GetUserProfilePhotos(BaseClient): Args: user_id (``int`` | ``str``): - Unique identifier of the target user. + Unique identifier (int) or username (str) of the target chat. + For your personal cloud (Saved Messages) you can simply use "me" or "self". + For a contact that exists in your Telegram address book you can use his phone number (str). + For a private channel/supergroup you can use its *t.me/joinchat/* link. offset (``int``, *optional*): Sequential number of the first photo to be returned.