From 61a2ad812ef5b01f4022d868971a5d625711b880 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Thu, 20 Sep 2018 16:33:36 +0200 Subject: [PATCH] Add missing docstrings for edit_message_media --- .../methods/messages/edit_message_media.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/pyrogram/client/methods/messages/edit_message_media.py b/pyrogram/client/methods/messages/edit_message_media.py index 7bf66d5e..74778865 100644 --- a/pyrogram/client/methods/messages/edit_message_media.py +++ b/pyrogram/client/methods/messages/edit_message_media.py @@ -36,6 +36,28 @@ class EditMessageMedia(BaseClient): message_id: int, media, reply_markup=None): + """Use this method to 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. + Use previously uploaded file via its file_id or specify a URL. On success, if the edited message was sent + by the bot, the edited Message is returned, otherwise True is returned. + + Args: + chat_id (``int`` | ``str``): + 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). + + message_id (``int``): + Message identifier in the chat specified in chat_id. + + media (:obj:`InputMediaAnimation` | :obj:`InputMediaAudio` | :obj:`InputMediaDocument` | :obj:`InputMediaPhoto` | :obj:`InputMediaVideo`) + One of the InputMedia objects describing an animation, audio, document, photo or video. + + reply_markup (:obj:`InlineKeyboardMarkup`, *optional*): + An InlineKeyboardMarkup object. + """ style = self.html if media.parse_mode.lower() == "html" else self.markdown caption = media.caption