Extends
Members
id :ContactId
ID that represents the contact
Type:
- Inherited From:
- Source:
isBlocked :boolean
Indicates if you have blocked this contact
Type:
- boolean
- Inherited From:
- Source:
isBusiness :boolean
Indicates if the contact is a business contact
Type:
- boolean
- Inherited From:
- Source:
isEnterprise :boolean
Indicates if the contact is an enterprise contact
Type:
- boolean
- Inherited From:
- Source:
isGroup :boolean
Indicates if the contact is a group contact
Type:
- boolean
- Inherited From:
- Source:
isMe :boolean
Indicates if the contact is the current user's contact
Type:
- boolean
- Inherited From:
- Source:
isMyContact :boolean
Indicates if the number is saved in the current phone's contacts
Type:
- boolean
- Inherited From:
- Source:
isUser :boolean
Indicates if the contact is a user contact
Type:
- boolean
- Inherited From:
- Source:
isWAContact :boolean
Indicates if the number is registered on WhatsApp
Type:
- boolean
- Inherited From:
- Source:
(nullable) name :string
The contact's name, as saved by the current user
Type:
- string
- Inherited From:
- Source:
number :string
Contact's phone number
Type:
- string
- Inherited From:
- Source:
pushname :string
The name that the contact has configured to be shown publically
Type:
- string
- Inherited From:
- Source:
(nullable) shortName :string
A shortened version of name
Type:
- string
- Inherited From:
- Source:
Methods
(async) block() → {Promise.<boolean>}
Blocks this contact from WhatsApp
- Inherited From:
- Source:
Returns:
- Type
- Promise.<boolean>
(async) getAbout() → {Promise.<?string>}
Gets the Contact's current "about" info. Returns null if you don't have permission to read their status.
- Inherited From:
- Source:
Returns:
- Type
- Promise.<?string>
(async) getBroadcast() → {Promise.<Broadcast>}
Gets the Contact's current status broadcast.
- Inherited From:
- Source:
Returns:
- Type
- Promise.<Broadcast>
(async) getChat() → {Promise.<Chat>}
Returns the Chat that corresponds to this Contact. Will return null when getting chat for currently logged in user.
- Inherited From:
- Source:
Returns:
- Type
- Promise.<Chat>
(async) getCommonGroups() → {Promise.<Array.<WAWebJS.ChatId>>}
Gets the Contact's common groups with you. Returns empty array if you don't have any common group.
- Inherited From:
- Source:
Returns:
- Type
- Promise.<Array.<WAWebJS.ChatId>>
(async) getCountryCode() → {Promise.<string>}
Returns the contact's countrycode, (1541859685@c.us) => (1)
- Inherited From:
- Source:
Returns:
- Type
- Promise.<string>
(async) getFormattedNumber() → {Promise.<string>}
Returns the contact's formatted phone number, (12345678901@c.us) => (+1 (234) 5678-901)
- Inherited From:
- Source:
Returns:
- Type
- Promise.<string>
(async) getProfilePicUrl() → {Promise.<string>}
Returns the contact's profile picture URL, if privacy settings allow it
- Inherited From:
- Source:
Returns:
- Type
- Promise.<string>
(async) unblock() → {Promise.<boolean>}
Unblocks this contact from WhatsApp
- Inherited From:
- Source:
Returns:
- Type
- Promise.<boolean>