• Add an existing Telegram user as a contact

    Parameters

    • client: ITelegramClient
    • params: {
          firstName: string;
          lastName?: string;
          phone?: string;
          sharePhone?: boolean;
          userId: InputPeerLike;
      }
      • firstName: string

        First name of the contact

      • OptionallastName?: string

        Last name of the contact

      • Optionalphone?: string

        Phone number of the contact, if available

      • OptionalsharePhone?: boolean

        Whether to share your own phone number with the newly created contact

        false
        
      • userId: InputPeerLike

        User ID, username or phone number

    Returns Promise<User>