• Edit an invite link. You can only edit non-primary invite links.

    Only pass the fields that you want to modify.

    Parameters

    • client: ITelegramClient
    • params: {
          chatId: InputPeerLike;
          expires?: number | Date;
          link: string | ChatInviteLink;
          usageLimit?: number;
          withApproval?: boolean;
      }
      • chatId: InputPeerLike

        Chat ID

      • Optionalexpires?: number | Date

        Date when this link will expire. If number is passed, UNIX time in ms is expected.

      • link: string | ChatInviteLink

        Invite link to edit

      • OptionalusageLimit?: number

        Maximum number of users that can be members of this chat at the same time after joining using this link.

        Integer in range [1, 99999] or Infinity,

      • OptionalwithApproval?: boolean

        Whether users to be joined via this link need to be approved by an admin

    Returns Promise<ChatInviteLink>

    Modified invite link