diff --git a/pyrogram/client/methods/chats/unpin_chat_message.py b/pyrogram/client/methods/chats/unpin_chat_message.py index 90f94fef..b1eeec79 100644 --- a/pyrogram/client/methods/chats/unpin_chat_message.py +++ b/pyrogram/client/methods/chats/unpin_chat_message.py @@ -22,7 +22,22 @@ from ...ext import BaseClient class UnpinChatMessage(BaseClient): def unpin_chat_message(self, chat_id: int or str): - # TODO: Docstrings + """Use this method to unpin a message in a supergroup or a channel. + You must be an administrator in the chat for this to work and must have the "can_pin_messages" admin + right in the supergroup or "can_edit_messages" admin right in the channel. + + 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 doesn't belong to a supergroup or a channel. + """ peer = self.resolve_peer(chat_id) if isinstance(peer, types.InputPeerChannel):