addContact
Add a contact. USER-ONLY
Parameters
The identifier of the user to add as contact.
firstName: string
The contact’s first name.
lastName?: string
The contact’s last name.
Whether the phone number of the current account should be shared with the new contact.
phoneNumber?: string
The contact’s phone number.
note?: string
A note to attach to the contact.
The note’s entities.
The parse mode to use for the note
Result
void
Syntax
// Required parameters only.
await client.addContact(userId, firstName);
// Required parameters + optional parameters.
// Any of the optional parameters can be omitted.
await client.addContact(userId, firstName, {
lastName,
isPhoneNumberShared,
phoneNumber,
note,
noteEntities,
noteParseMode,
});