whalibmob 5.40.43 → 5.40.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -26
- package/llms.txt +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,6 +13,8 @@ code, and bring the account into being. Both transports, one API.
|
|
|
13
13
|
[](LICENSE)
|
|
14
14
|
[](index.d.ts)
|
|
15
15
|
|
|
16
|
+
[](https://github.com/Kunboruto20/whalibmob/blob/main/docs/interactive-buttons.md)
|
|
17
|
+
|
|
16
18
|
[](https://github.com/Kunboruto20/whalibmob/blob/main/Brasil.md)
|
|
17
19
|
|
|
18
20
|
**🇧🇷 Fala português?** A documentação completa está traduzida em **[Brasil.md](https://github.com/Kunboruto20/whalibmob/blob/main/Brasil.md)** — tudo o que está aqui, na sua língua.
|
|
@@ -26,8 +28,7 @@ code, and bring the account into being. Both transports, one API.
|
|
|
26
28
|
[](https://github.com/Kunboruto20/whalibmob/blob/main/docs/registration.md#library-api)
|
|
27
29
|
[](https://github.com/Kunboruto20/whalibmob/blob/main/docs/messaging.md#sending-messages)
|
|
28
30
|
[](https://github.com/Kunboruto20/whalibmob/blob/main/docs/events-history.md#handling-events)
|
|
29
|
-
|
|
30
|
-
[](https://github.com/Kunboruto20/whalibmob/blob/main/docs/interactive-buttons.md)
|
|
31
|
+
[](https://github.com/Kunboruto20/whalibmob/blob/main/docs/interactive-buttons.md)
|
|
31
32
|
|
|
32
33
|
[](https://github.com/Kunboruto20/whalibmob/blob/main/docs/attestation.md#device-attestation--play-integrity-and-app-attest)
|
|
33
34
|
|
|
@@ -35,30 +36,6 @@ code, and bring the account into being. Both transports, one API.
|
|
|
35
36
|
|
|
36
37
|
</div>
|
|
37
38
|
|
|
38
|
-
> [!NOTE]
|
|
39
|
-
> **🆕 whalibmob now supports interactive button messages.**
|
|
40
|
-
>
|
|
41
|
-
> Send a "card" message with up to **three tappable buttons** — a **link** button
|
|
42
|
-
> (opens a URL), a **call** button (dials a number), a **copy** button (copies a
|
|
43
|
-
> code), or a **quick-reply** — with an optional header image. One call does it,
|
|
44
|
-
> from both the Node API and the `wa` CLI, and it works the **same on a
|
|
45
|
-
> mobile-registered number and a linked web/companion session** (a WhatsApp
|
|
46
|
-
> message is encoded identically on both).
|
|
47
|
-
>
|
|
48
|
-
> ```js
|
|
49
|
-
> await client.sendInteractive('14155552671', {
|
|
50
|
-
> body: 'Check this out!',
|
|
51
|
-
> footer: 'whalibmob',
|
|
52
|
-
> buttons: [
|
|
53
|
-
> { text: 'Open site', url: 'https://example.com' }, // link button
|
|
54
|
-
> { text: 'Call us', phone: '14155552671' }, // call button
|
|
55
|
-
> { text: 'Copy code', copy: 'PROMO2026' } // copy button
|
|
56
|
-
> ]
|
|
57
|
-
> });
|
|
58
|
-
> ```
|
|
59
|
-
>
|
|
60
|
-
> 👉 **Full guide, all button types and the CLI command: [docs/interactive-buttons.md](https://github.com/Kunboruto20/whalibmob/blob/main/docs/interactive-buttons.md)**
|
|
61
|
-
|
|
62
39
|
> [!TIP]
|
|
63
40
|
> **Registration not working on some numbers? Here is the 100% success route.**
|
|
64
41
|
>
|
|
@@ -185,6 +162,30 @@ main().catch(err => { console.error(err.message || err); process.exit(1) })
|
|
|
185
162
|
|
|
186
163
|
The client reconnects by itself after a dropped connection — do not create a new one on `disconnected`. Prefer no code at all? The [CLI](https://github.com/Kunboruto20/whalibmob/blob/main/docs/cli-getting-started.md#cli--getting-started) does the same in a few commands: request the code, register, connect, then `/send`. A brand-new account is watched closely by WhatsApp's anti-abuse checks, so send the first messages to people who have your number saved — see [Accounts](https://github.com/Kunboruto20/whalibmob/blob/main/docs/accounts.md#why-registration-can-be-blocked--the-anti-abuse-landscape).
|
|
187
164
|
|
|
165
|
+
> [!NOTE]
|
|
166
|
+
> **🆕 whalibmob now supports interactive button messages.**
|
|
167
|
+
>
|
|
168
|
+
> Send a "card" message with up to **three tappable buttons** — a **link** button
|
|
169
|
+
> (opens a URL), a **call** button (dials a number), a **copy** button (copies a
|
|
170
|
+
> code), or a **quick-reply** — with an optional header image. One call does it,
|
|
171
|
+
> from both the Node API and the `wa` CLI, and it works the **same on a
|
|
172
|
+
> mobile-registered number and a linked web/companion session** (a WhatsApp
|
|
173
|
+
> message is encoded identically on both).
|
|
174
|
+
>
|
|
175
|
+
> ```js
|
|
176
|
+
> await client.sendInteractive('14155552671', {
|
|
177
|
+
> body: 'Check this out!',
|
|
178
|
+
> footer: 'whalibmob',
|
|
179
|
+
> buttons: [
|
|
180
|
+
> { text: 'Open site', url: 'https://example.com' }, // link button
|
|
181
|
+
> { text: 'Call us', phone: '14155552671' }, // call button
|
|
182
|
+
> { text: 'Copy code', copy: 'PROMO2026' } // copy button
|
|
183
|
+
> ]
|
|
184
|
+
> });
|
|
185
|
+
> ```
|
|
186
|
+
>
|
|
187
|
+
> 👉 **Full guide, all button types and the CLI command: [docs/interactive-buttons.md](https://github.com/Kunboruto20/whalibmob/blob/main/docs/interactive-buttons.md)**
|
|
188
|
+
|
|
188
189
|
|
|
189
190
|
## Approving a Companion Device
|
|
190
191
|
|
package/llms.txt
CHANGED
|
@@ -136,6 +136,7 @@ main().catch((err) => { console.error(err.message || err); process.exit(1); });
|
|
|
136
136
|
- [Handling Events](https://github.com/Kunboruto20/whalibmob#handling-events): the full event list, keepalive and offline-sync events included
|
|
137
137
|
- [Handling Errors](https://github.com/Kunboruto20/whalibmob/blob/main/docs/events-history.md#handling-errors): every error the library raises is a Boom (`@hapi/boom`) with an HTTP-style `err.output.statusCode` — 400 bad input, 401 not authenticated, 408 timed out, 428 not connected, 502 a server answered wrongly, or the server's own status passed through
|
|
138
138
|
- [Encrypted add-ons](https://github.com/Kunboruto20/whalibmob/blob/main/docs/messaging.md#encrypted-reactions-comments-event-responses-and-edits): poll votes, encrypted reactions, comments, event responses and edits; `sendRawMessage` for any encoded Message
|
|
139
|
+
- [Interactive buttons](https://github.com/Kunboruto20/whalibmob/blob/main/docs/interactive-buttons.md): `sendInteractive` sends a "card" message with up to three tappable buttons — link (`url`), call (`phone`), copy (`copy`) or quick-reply (`id`) — with an optional header image; works the same on a mobile-registered number and a linked web session, and from the `wa` CLI
|
|
139
140
|
- [History Sync](https://github.com/Kunboruto20/whalibmob#history-sync): the backlog the server sends on first connect, and reading it back
|
|
140
141
|
- [Status / Stories](https://github.com/Kunboruto20/whalibmob#status--stories): posting to status
|
|
141
142
|
- [Send States in Chat](https://github.com/Kunboruto20/whalibmob#send-states-in-chat): typing, recording, online presence
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "whalibmob",
|
|
3
|
-
"version": "5.40.
|
|
3
|
+
"version": "5.40.45",
|
|
4
4
|
"description": "Node.js library for WhatsApp — register a number over SMS, or link as a companion by QR. Signal E2E encryption, media, groups, channels.",
|
|
5
5
|
"author": "Kunboruto20",
|
|
6
6
|
"main": "index.js",
|