whatsapp-web.js
A WhatsApp API client that connects through the WhatsApp Web browser app
It uses Puppeteer to run a real instance of Whatsapp Web to avoid getting blocked.
@@ -222,6 +222,11 @@ client.initialize();diff --git a/.gitignore b/.gitignore index 5bd86e2..968c2a4 100644 --- a/.gitignore +++ b/.gitignore @@ -63,3 +63,6 @@ typings/ # next.js build output .next + +# macOS Thumbnails +._* diff --git a/docs/Base.html b/docs/Base.html index d1b98f0..c5af780 100644 --- a/docs/Base.html +++ b/docs/Base.html @@ -4,7 +4,7 @@
-Returns the Chat that corresponds to this Contact. + Will return null when getting chat for currently logged in user.
+Returns the contact's profile picture URL, if privacy settings allow it
@@ -227,7 +242,7 @@ diff --git a/docs/Chat.html b/docs/Chat.html index 9b8c796..26a0df4 100644 --- a/docs/Chat.html +++ b/docs/Chat.html @@ -4,7 +4,7 @@ -Unix timestamp for when the chat was created
+Unix timestamp for when the last activity occurred
Returns the Contact that corresponds to this Chat.
+Promise containing Contact
Mutes this chat until a specified date
Send a message to this chat
options
object
++
Yes
Source: Client.
Source: Client.
Starting point for interacting with the WhatsApp Web API
| Name | +Type | +Optional | +Description | +||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
+ options + |
+
+ + |
+
+ + |
+
+ Client options +Values in
|
+
Current connection information
+Returns the version of WhatsApp Web currently being run
Promise
Promise containing string
Check if a given ID is registered in whatsapp
+| Name | +Type | +Optional | +Description | +
|---|---|---|---|
|
+ id + |
+
+ string + |
+
+ + |
+
+ the whatsapp user's ID + |
+
Send a message to a specific chatId
options
object
++
Yes
Options used when sending the message
Sets the current user's display name. + This is the name shown to WhatsApp users that have not added you as a contact beside your number in groups and in your profile.
+| Name | +Type | +Optional | +Description | +
|---|---|---|---|
|
+ displayName + |
+
+ string + |
+
+ + |
+
+ New display name + |
+
Sets the current user's status message
Emitted when authentication is successful
|
Object containing session information. Can be used to restore the session. +Values in
|
- + Yes |
@@ -698,7 +710,7 @@ diff --git a/docs/GroupNotification.html b/docs/GroupNotification.html index 27ead88..b2ae4b4 100644 --- a/docs/GroupNotification.html +++ b/docs/GroupNotification.html @@ -4,7 +4,7 @@ - |
| Name | +Type | +Optional | +Description | +
|---|---|---|---|
|
+ chat + |
+
+ (string or Chat) + |
+
+ + |
+
+ Chat model or chat ID to which the message will be forwarded + |
+
Promise
Returns the Chat this message was sent in
Sends a message as a reply to this message. If chatId is specified, it will be sent through the specified Chat. If not, it will send the message in the same Chat as the original message was sent.
@@ -349,10 +390,9 @@string
+
Yes
Value can be null.
options
object
++
Yes
Unix timestamp for when the chat was created
+Unix timestamp for when the last activity occurred
Returns the Contact that corresponds to this Chat.
+Mutes this chat until a specified date
Send a message to this chat
+
Yes
Returns the Chat that corresponds to this Contact. + Will return null when getting chat for currently logged in user.
+Returns the contact's profile picture URL, if privacy settings allow it
@@ -220,7 +235,7 @@ diff --git a/docs/Util.html b/docs/Util.html index 70c7bc7..99441ab 100644 --- a/docs/Util.html +++ b/docs/Util.html @@ -4,7 +4,7 @@ -Message options.
+| Name | +Type | +Optional | +Description | +
|---|---|---|---|
|
+ linkPreview + |
+
+ boolean + |
+
+ Yes + |
+
+ Show links preview +Defaults to |
+
|
+ sendAudioAsVoice + |
+
+ boolean + |
+
+ Yes + |
+
+ Send audio as voice message +Defaults to |
+
|
+ caption + |
+
+ string + |
+
+ Yes + |
+
+ Image or video caption + |
+
|
+ quotedMessageId + |
+
+ string + |
+
+ Yes + |
+
+ Id of the message that is being quoted (or replied to) + |
+
|
+ mentions + |
+
+ Array of Contact + |
+
+ Yes + |
+
+ Contacts that are being mentioned in the message + |
+
|
+ sendSeen + |
+
+ boolean + |
+
+ Yes + |
+
+ Mark the conversation as seen after sending the message +Defaults to |
+
|
+ media + |
+
+ boolean + |
+
+ Yes + |
+
+ Media to be sent + |
+
A WhatsApp API client that connects through the WhatsApp Web browser app
It uses Puppeteer to run a real instance of Whatsapp Web to avoid getting blocked.
@@ -222,6 +222,11 @@ client.initialize();