Skip to content

Commit cc9bc56

Browse files
committed
Add important note to export_chat_invite_link
1 parent 881f3e4 commit cc9bc56

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pyrogram/client/methods/chats/export_chat_invite_link.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ def export_chat_invite_link(
3131
3232
You must be an administrator in the chat for this to work and have the appropriate admin rights.
3333
34+
.. note ::
35+
36+
Each administrator in a chat generates their own invite links. Bots can't use invite links generated by
37+
other administrators. If you want your bot to work with invite links, it will need to generate its own link
38+
using this method – after this the link will become available to the bot via the :meth:`get_chat` method.
39+
If your bot needs to generate a new invite link replacing its previous one, use this method again.
40+
3441
Args:
3542
chat_id (``int`` | ``str``):
3643
Unique identifier for the target chat or username of the target channel/supergroup

0 commit comments

Comments
 (0)