Documentation - v0.27.0
    Preparing search index...
    • Add an existing Telegram user as a contact

      Parameters

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

          First name of the contact

        • OptionallastName?: string

          Last name of the contact

        • Optionalnote?: InputText

          Note to 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>