Contact
Source: structures/
Represents a Contact on WhatsApp
Properties
Methods
new Contact()
- Extends
- Base
Properties
id object
ID that represents the contact
isBusiness boolean
Indicates if the contact is a business contact
isEnterprise boolean
Indicates if the contact is an enterprise contact
isGroup boolean
Indicates if the contact is a group contact
isMe boolean
Indicates if the contact is the current user's contact
isMyContact boolean
Indicates if the number is saved in the current phone's contacts
isUser boolean
Indicates if the contact is a user contact
isWAContact boolean
Indicates if the number is registered on WhatsApp
name nullable string
The contact's name, as saved by the current user
number string
Contact's phone number
pushname string
The name that the contact has configured to be shown publically
shortName nullable string
A shortened version of name
Methods
getChat() → Promise containing Chat
Returns the Chat that corresponds to this Contact. Will return null when getting chat for currently logged in user.
- Returns
-
Promise containing Chat
getProfilePicUrl() → Promise containing string
Returns the contact's profile picture URL, if privacy settings allow it
- Returns
-
Promise containing string