Document delete_chat_photo

This commit is contained in:
Dan 2018-07-15 16:34:15 +02:00
parent 98578160f0
commit 3fcf9b9ef6

View File

@ -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 <pyrogram.Error>`
``ValueError``: If a chat_id belongs to user.
"""
peer = self.resolve_peer(chat_id)
if isinstance(peer, types.InputPeerChat):