Document unpin_chat_message
This commit is contained in:
parent
f8d44b8e77
commit
15e83e12ca
@ -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 <pyrogram.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):
|
||||
|
Loading…
Reference in New Issue
Block a user