Create an additional invite link for a chat.
You must be an administrator in the chat for this to work and must have the appropriate admin rights.
The link can be revoked using the method
revoke_chat_invite_link().Usable by Users Bots
str) – Unique identifier for the target chat or username of the target channel/supergroup (in the format @username).
str, optional) – Invite link name.
datetime, optional) – Point in time when the link will expire. Defaults to None (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 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.
# Create a new link without limits link = await app.create_chat_invite_link(chat_id) # Create a new link for up to 3 new users link = await app.create_chat_invite_link(chat_id, member_limit=3)