mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
Add bound method Chat.unpin_all_messages (#959)
This commit is contained in:
parent
1c225776c9
commit
abc84b829a
2 changed files with 21 additions and 0 deletions
|
|
@ -539,6 +539,7 @@ def pyrogram_api():
|
|||
Chat.leave
|
||||
Chat.mark_unread
|
||||
Chat.set_protected_content
|
||||
Chat.unpin_all_messages
|
||||
""",
|
||||
user="""
|
||||
User
|
||||
|
|
|
|||
|
|
@ -1047,3 +1047,23 @@ class Chat(Object):
|
|||
self.id,
|
||||
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…
Reference in a new issue