mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-24 10:58:29 +00:00
Add bound method Chat.unpin_all_messages (#959)
This commit is contained in:
parent
1c225776c9
commit
abc84b829a
@ -539,6 +539,7 @@ def pyrogram_api():
|
|||||||
Chat.leave
|
Chat.leave
|
||||||
Chat.mark_unread
|
Chat.mark_unread
|
||||||
Chat.set_protected_content
|
Chat.set_protected_content
|
||||||
|
Chat.unpin_all_messages
|
||||||
""",
|
""",
|
||||||
user="""
|
user="""
|
||||||
User
|
User
|
||||||
|
@ -1047,3 +1047,23 @@ class Chat(Object):
|
|||||||
self.id,
|
self.id,
|
||||||
enabled=enabled
|
enabled=enabled
|
||||||
)
|
)
|
||||||
|
|
||||||
|
async def unpin_all_messages(self) -> bool:
|
||||||
|
"""Bound method *unpin_all_messages* of :obj:`~pyrogram.types.Chat`.
|
||||||
|
|
||||||
|
Use as a shortcut for:
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
client.unpin_all_chat_messages(chat_id)
|
||||||
|
|
||||||
|
Example:
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
chat.unpin_all_messages()
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
``bool``: On success, True is returned.
|
||||||
|
"""
|
||||||
|
|
||||||
|
return await self._client.unpin_all_chat_messages(self.id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user