Add export_invite_link bound method (#300)

This commit is contained in:
ColinShark 2019-08-10 00:54:22 +02:00 committed by Dan
parent 5164ea78c2
commit c9b1e09348

View File

@ -714,3 +714,27 @@ class Chat(Object):
"""
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)