Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add export_invite_link bound method (#300)
  • Loading branch information
ColinShark authored and delivrance committed Aug 9, 2019
1 parent 5164ea7 commit c9b1e09
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions pyrogram/client/types/user_and_chats/chat.py
Expand Up @@ -714,3 +714,27 @@ def leave(self):
"""

return self._client.leave_chat(self.id)


def export_invite_link(self):
"""Bound method *export_invite_link* of :obj:`Chat`.
Use as a shortcut for:
.. code-block:: python
client.export_chat_invite_link(123456789)
Example:
.. code-block:: python
chat.export_invite_link()
Returns:
``str``: On success, the exported invite link is returned.
Raises:
ValueError: In case the chat_id belongs to a user.
"""

return self._client.export_invite_link(self.id)

0 comments on commit c9b1e09

Please sign in to comment.