mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-27 20:37:54 +00:00
Add export_invite_link bound method (#300)
This commit is contained in:
parent
5164ea78c2
commit
c9b1e09348
@ -714,3 +714,27 @@ class Chat(Object):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
return self._client.leave_chat(self.id)
|
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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user