From 0bba5daea484981f4cb803c1009d695381f6281b Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Wed, 18 Apr 2018 11:15:09 +0200 Subject: [PATCH] Update docstrings --- pyrogram/client/client.py | 6 ++++-- pyrogram/client/handlers/handlers.py | 8 +++++--- pyrogram/client/input_media_photo.py | 2 +- pyrogram/client/input_media_video.py | 2 +- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index 9ed6261f..a1033629 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -2012,7 +2012,8 @@ class Client: For a private channel/supergroup you can use its *t.me/joinchat/* link. media (``list``): - A list containing either :obj:`pyrogram.InputMediaPhoto` or :obj:`pyrogram.InputMediaVideo` objects + A list containing either :obj:`InputMediaPhoto ` or + :obj:`InputMediaVideo ` objects describing photos and videos to be sent, must include 2–10 items. disable_notification (``bool``, optional): @@ -3128,7 +3129,8 @@ class Client: elif isinstance(message, str): media = pyrogram.Document( file_id=message, - file_size=0 + file_size=0, + mime_type="" ) else: return diff --git a/pyrogram/client/handlers/handlers.py b/pyrogram/client/handlers/handlers.py index 33fff85d..e909e218 100644 --- a/pyrogram/client/handlers/handlers.py +++ b/pyrogram/client/handlers/handlers.py @@ -20,8 +20,9 @@ from .handler import Handler class MessageHandler(Handler): - """The Message handler class. It is used to handle text, media and service messages coming from - any chat (private, group, channel). + """The Message handler class. Used to handle text, media and service messages coming from + any chat (private, group, channel). It is intended to be used with + :meth:`add_handler() ` Args: callback (``callable``): @@ -52,7 +53,8 @@ class MessageHandler(Handler): class RawUpdateHandler(Handler): - """The Raw Update handler class. It is used to handle raw updates. + """The Raw Update handler class. Used to handle raw updates. It is intended to be used with + :meth:`add_handler() ` Args: callback (``callable``): diff --git a/pyrogram/client/input_media_photo.py b/pyrogram/client/input_media_photo.py index 597dfa75..3f0e4488 100644 --- a/pyrogram/client/input_media_photo.py +++ b/pyrogram/client/input_media_photo.py @@ -19,7 +19,7 @@ class InputMediaPhoto: """This object represents a photo to be sent inside an album. - It is intended to be used with :obj:`send_media_group `. + It is intended to be used with :obj:`send_media_group() `. Args: media (:obj:`str`): diff --git a/pyrogram/client/input_media_video.py b/pyrogram/client/input_media_video.py index a25a65df..7ad5ce50 100644 --- a/pyrogram/client/input_media_video.py +++ b/pyrogram/client/input_media_video.py @@ -19,7 +19,7 @@ class InputMediaVideo: """This object represents a video to be sent inside an album. - It is intended to be used with :obj:`send_media_group `. + It is intended to be used with :obj:`send_media_group() `. Args: media (:obj:`str`):