You must be an administrator in the chat for this to work and must have the appropriate admin rights.
Usable by Users Bots
chat_id (int | str) – Unique identifier for the target chat or username of the target channel/supergroup
(in the format @username).
invite_link (str) – The invite link to edit
name (str, optional) – Invite link name.
expire_date (datetime, optional) – Point in time when the link will expire.
Defaults to None (no change), pass None to set no expiration date.
member_limit (int, optional) – Maximum number of users that can be members of the chat simultaneously after joining the chat via this
invite link; 1-99999.
Defaults to None (no change), pass 0 to set no member limit.
creates_join_request (bool, optional) – True, if users joining the chat via the link need to be approved by chat administrators.
If True, member_limit can’t be specified.
# Edit the member limit of a linklink=awaitapp.edit_chat_invite_link(chat_id,invite_link,member_limit=5)# Set no expiration date of a linklink=awaitapp.edit_chat_invite_link(chat_id,invite_link,expire_date=0)
Consider disabling your ad-blocker on this site to support Pyrogram