From 215f54f32b17fb2e7c1ed577908d4d449fdd567d Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sun, 22 Jul 2018 02:07:44 +0200 Subject: [PATCH] Add get_chat_member documentation --- .../client/methods/chats/get_chat_member.py | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/pyrogram/client/methods/chats/get_chat_member.py b/pyrogram/client/methods/chats/get_chat_member.py index 082d1671..c4fe0715 100644 --- a/pyrogram/client/methods/chats/get_chat_member.py +++ b/pyrogram/client/methods/chats/get_chat_member.py @@ -24,7 +24,25 @@ class GetChatMember(BaseClient): def get_chat_member(self, chat_id: int or str, user_id: int or str): - # TODO: docstrings + """Use this method to get information about a single member of a chat. + + Args: + chat_id (``int`` | ``str``): + Unique identifier (int) or username (str) of the target chat. + For a private channel/supergroup you can use its *t.me/joinchat/* link. + + user_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). + For a private channel/supergroup you can use its *t.me/joinchat/* link. + + Returns: + On success, a :obj:`ChatMember ` object is returned. + + Raises: + :class:`Error ` + """ chat_id = self.resolve_peer(chat_id) user_id = self.resolve_peer(user_id)