From 3fcf9b9ef6981d1abd113e1a030547ea15aca94d Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sun, 15 Jul 2018 16:34:15 +0200 Subject: [PATCH] Document delete_chat_photo --- .../client/methods/chats/delete_chat_photo.py | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/pyrogram/client/methods/chats/delete_chat_photo.py b/pyrogram/client/methods/chats/delete_chat_photo.py index 98998fbd..57d90b11 100644 --- a/pyrogram/client/methods/chats/delete_chat_photo.py +++ b/pyrogram/client/methods/chats/delete_chat_photo.py @@ -22,7 +22,26 @@ from ...ext import BaseClient class DeleteChatPhoto(BaseClient): def delete_chat_photo(self, chat_id: int or str): - # TODO: Docstrings + """Use this method to 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. + + Note: + In regular groups (non-supergroups), this method will only work if the "All Members Are Admins" + setting is off. + + 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. + + Returns: + True on success. + + Raises: + :class:`Error ` + ``ValueError``: If a chat_id belongs to user. + """ peer = self.resolve_peer(chat_id) if isinstance(peer, types.InputPeerChat):