Edit a non-primary invite link.
You must be an administrator in the chat for this to work and must have the appropriate admin rights.Usable by Users Bots
str) – Unique identifier for the target chat or username of the target channel/supergroup (in the format @username).
str) – The invite link to edit
str, optional) – Invite link name.
datetime, optional) – Point in time when the link will expire. Defaults to None (no change), pass None to set no expiration date.
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.
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.
ChatInviteLink– On success, the new invite link is returned
# Edit the member limit of a link link = await app.edit_chat_invite_link(chat_id, invite_link, member_limit=5) # Set no expiration date of a link link = await app.edit_chat_invite_link(chat_id, invite_link, expire_date=0)