violetics 7.0.0-alpha
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/LICENSE +21 -0
- package/README.md +318 -0
- package/WAProto/index.js +169661 -0
- package/engine-requirements.js +10 -0
- package/lib/Defaults/baileys-version.json +3 -0
- package/lib/Defaults/index.js +156 -0
- package/lib/Defaults/phonenumber-mcc.json +223 -0
- package/lib/Signal/Group/ciphertext-message.js +15 -0
- package/lib/Signal/Group/group-session-builder.js +64 -0
- package/lib/Signal/Group/group_cipher.js +96 -0
- package/lib/Signal/Group/index.js +57 -0
- package/lib/Signal/Group/keyhelper.js +55 -0
- package/lib/Signal/Group/queue-job.js +57 -0
- package/lib/Signal/Group/sender-chain-key.js +34 -0
- package/lib/Signal/Group/sender-key-distribution-message.js +66 -0
- package/lib/Signal/Group/sender-key-message.js +69 -0
- package/lib/Signal/Group/sender-key-name.js +51 -0
- package/lib/Signal/Group/sender-key-record.js +53 -0
- package/lib/Signal/Group/sender-key-state.js +99 -0
- package/lib/Signal/Group/sender-message-key.js +29 -0
- package/lib/Signal/libsignal.js +177 -0
- package/lib/Signal/lid-mapping.js +185 -0
- package/lib/Socket/Client/abstract-socket-client.js +13 -0
- package/lib/Socket/Client/index.js +19 -0
- package/lib/Socket/Client/mobile-socket-client.js +65 -0
- package/lib/Socket/Client/web-socket-client.js +111 -0
- package/lib/Socket/business.js +260 -0
- package/lib/Socket/chats.js +1013 -0
- package/lib/Socket/groupStatus.js +637 -0
- package/lib/Socket/groups.js +317 -0
- package/lib/Socket/index.js +11 -0
- package/lib/Socket/messages-recv.js +1116 -0
- package/lib/Socket/messages-send.js +815 -0
- package/lib/Socket/newsletter.js +430 -0
- package/lib/Socket/registration.js +166 -0
- package/lib/Socket/socket.js +761 -0
- package/lib/Socket/usync.js +70 -0
- package/lib/Store/index.js +10 -0
- package/lib/Store/make-cache-manager-store.js +83 -0
- package/lib/Store/make-in-memory-store.js +427 -0
- package/lib/Store/make-ordered-dictionary.js +81 -0
- package/lib/Store/object-repository.js +27 -0
- package/lib/Types/Auth.js +2 -0
- package/lib/Types/Call.js +2 -0
- package/lib/Types/Chat.js +4 -0
- package/lib/Types/Contact.js +2 -0
- package/lib/Types/Events.js +2 -0
- package/lib/Types/GroupMetadata.js +2 -0
- package/lib/Types/Label.js +27 -0
- package/lib/Types/LabelAssociation.js +9 -0
- package/lib/Types/Message.js +9 -0
- package/lib/Types/Newsletter.js +38 -0
- package/lib/Types/Product.js +2 -0
- package/lib/Types/Signal.js +2 -0
- package/lib/Types/Socket.js +2 -0
- package/lib/Types/State.js +2 -0
- package/lib/Types/USync.js +2 -0
- package/lib/Types/index.js +42 -0
- package/lib/Utils/auth-utils.js +206 -0
- package/lib/Utils/baileys-event-stream.js +63 -0
- package/lib/Utils/business.js +234 -0
- package/lib/Utils/chat-utils.js +729 -0
- package/lib/Utils/crypto.js +151 -0
- package/lib/Utils/decode-wa-message.js +198 -0
- package/lib/Utils/event-buffer.js +515 -0
- package/lib/Utils/generics.js +502 -0
- package/lib/Utils/history.js +96 -0
- package/lib/Utils/index.js +33 -0
- package/lib/Utils/link-preview.js +93 -0
- package/lib/Utils/logger.js +7 -0
- package/lib/Utils/lt-hash.js +51 -0
- package/lib/Utils/make-mutex.js +43 -0
- package/lib/Utils/messages-media.js +819 -0
- package/lib/Utils/messages.js +819 -0
- package/lib/Utils/noise-handler.js +155 -0
- package/lib/Utils/process-message.js +321 -0
- package/lib/Utils/signal.js +153 -0
- package/lib/Utils/use-multi-file-auth-state.js +122 -0
- package/lib/Utils/validate-connection.js +222 -0
- package/lib/WABinary/constants.js +1304 -0
- package/lib/WABinary/decode.js +283 -0
- package/lib/WABinary/encode.js +265 -0
- package/lib/WABinary/generic-utils.js +198 -0
- package/lib/WABinary/index.js +21 -0
- package/lib/WABinary/jid-utils.js +62 -0
- package/lib/WABinary/types.js +2 -0
- package/lib/WAM/BinaryInfo.js +13 -0
- package/lib/WAM/constants.js +15350 -0
- package/lib/WAM/encode.js +155 -0
- package/lib/WAM/index.js +19 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +32 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +57 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +30 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +42 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +53 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +24 -0
- package/lib/WAUSync/Protocols/index.js +20 -0
- package/lib/WAUSync/USyncQuery.js +89 -0
- package/lib/WAUSync/USyncUser.js +26 -0
- package/lib/WAUSync/index.js +19 -0
- package/lib/index.js +44 -0
- package/package.json +109 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 xhclinton
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<h1>🌟 Violetics Baileys</h1>
|
|
3
|
+
<p><i>A professionally enhanced, feature-rich version of the Baileys WhatsApp Web API</i></p>
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/violetics)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
<br/>
|
|
10
|
+
|
|
11
|
+
Built for developers requiring robust WhatsApp automation with modern tooling, enhanced stability, and comprehensive documentation to handle **Hundreds of Sessions (Multi-Device)** concurrently using **SQLite**.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 📋 Table of Contents
|
|
16
|
+
|
|
17
|
+
- [✨ Features](#-features)
|
|
18
|
+
- [📦 Installation](#-installation)
|
|
19
|
+
- [🚀 Quick Start](#-quick-start)
|
|
20
|
+
- [🔌 Connection & Configuration](#-connection--configuration)
|
|
21
|
+
- [💾 Handling Hundreds of Sessions (SQLite)](#-handling-hundreds-of-sessions-sqlite)
|
|
22
|
+
- [📥 Core Features (Messages, Groups, Profile)](#-core-features)
|
|
23
|
+
- [⚖️ Legal Notice](#️-legal-notice)
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## ✨ Features
|
|
28
|
+
|
|
29
|
+
- 🚀 **Modern & Fast** – Built with TypeScript and latest technologies.
|
|
30
|
+
- 🔧 **Production Ready Stability** – Modified Web Socket client configurations, custom ping/pong keep-alives, and connection limits removed to prevent random logouts.
|
|
31
|
+
- 📱 **Multi-Device Support** – Full support for WhatsApp's multi-device protocol.
|
|
32
|
+
- 🔐 **End-to-End Encryption** – Secure communication using Signal Protocol.
|
|
33
|
+
- 📨 **All Message Types** – Support for text, media, documents, contacts, locations, polls, reactions, and more.
|
|
34
|
+
- 👥 **Advanced Group Management** – Comprehensive controls including unique group status support.
|
|
35
|
+
- 🛠️ **Developer Friendly** – Clean API, extensive examples, and detailed documentation.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## 📦 Installation
|
|
40
|
+
|
|
41
|
+
### Via NPM
|
|
42
|
+
```bash
|
|
43
|
+
npm install violetics
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Via GitHub
|
|
47
|
+
```bash
|
|
48
|
+
npm install github:cv3inx/violetics.git
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 🚀 Quick Start
|
|
54
|
+
|
|
55
|
+
Here is a basic example to get you connected and listening to messages using standard File Authentication.
|
|
56
|
+
|
|
57
|
+
```javascript
|
|
58
|
+
const { makeWASocket, useMultiFileAuthState, DisconnectReason } = require('violetics');
|
|
59
|
+
const { Boom } = require('@hapi/boom');
|
|
60
|
+
|
|
61
|
+
async function connectToWhatsApp() {
|
|
62
|
+
const { state, saveCreds } = await useMultiFileAuthState('auth_info_baileys');
|
|
63
|
+
|
|
64
|
+
const sock = makeWASocket({
|
|
65
|
+
auth: state,
|
|
66
|
+
printQRInTerminal: true,
|
|
67
|
+
browser: ["Ubuntu", "Chrome", "125"],
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
sock.ev.on('connection.update', (update) => {
|
|
71
|
+
const { connection, lastDisconnect } = update;
|
|
72
|
+
if (connection === 'close') {
|
|
73
|
+
const shouldReconnect = (lastDisconnect?.error)?.output?.statusCode !== DisconnectReason.loggedOut;
|
|
74
|
+
console.log('Connection closed. Reconnecting:', shouldReconnect);
|
|
75
|
+
if (shouldReconnect) connectToWhatsApp();
|
|
76
|
+
} else if (connection === 'open') {
|
|
77
|
+
console.log('✅ Successfully connected to WhatsApp!');
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
sock.ev.on('messages.upsert', async ({ messages }) => {
|
|
82
|
+
const m = messages[0];
|
|
83
|
+
if (!m.message || m.key.fromMe) return;
|
|
84
|
+
|
|
85
|
+
// Auto-reply example
|
|
86
|
+
if (m.message.conversation === 'ping') {
|
|
87
|
+
await sock.sendMessage(m.key.remoteJid, { text: 'pong!' });
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
// Save credentials when updated (debounced by default in this library)
|
|
92
|
+
sock.ev.on('creds.update', saveCreds);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
connectToWhatsApp();
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 🔌 Connection & Configuration
|
|
101
|
+
|
|
102
|
+
### Connect via Pairing Code (No QR)
|
|
103
|
+
|
|
104
|
+
If you're running the bot on a remote server without a terminal, you can pair using an 8-digit code instead of scanning a QR code.
|
|
105
|
+
|
|
106
|
+
```javascript
|
|
107
|
+
const sock = makeWASocket({ printQRInTerminal: false });
|
|
108
|
+
|
|
109
|
+
if (!sock.authState.creds.registered) {
|
|
110
|
+
const phoneNumber = '1234567890'; // Include country code, no symbols
|
|
111
|
+
const pairingCode = await sock.requestPairingCode(phoneNumber);
|
|
112
|
+
console.log('🔑 Your Pairing Code:', pairingCode);
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## 💾 Handling Hundreds of Sessions (SQLite)
|
|
119
|
+
|
|
120
|
+
Jika target Anda adalah merender **Ratusan Bot secara bersamaan** dalam 1 Node.js Process, **file JSON biasa sangat tidak dianjurkan** karena rentan lock-file race condition dan limitasi sinkronisasi disk I/O, yang memicu masalah `Connection Closed` atau `DisconnectReason.loggedOut` tiba-tiba karena Socket API kehabisan waktu memanggil Event Emitter.
|
|
121
|
+
|
|
122
|
+
Gunakan **SQLite** untuk auth *Multi-Session* dengan tiga aturan vital:
|
|
123
|
+
|
|
124
|
+
### 1. Gunakan Mode SQLite `WAL`
|
|
125
|
+
SQLite biasanya mengunci database saat sedang diproses (*Database is locked*). Untuk mematikan lock tersebut, pastikan perintah ini selalu berjalan di koneksi pertama inisialisasi SQLite Anda:
|
|
126
|
+
```sql
|
|
127
|
+
PRAGMA journal_mode=WAL;
|
|
128
|
+
PRAGMA synchronous=NORMAL;
|
|
129
|
+
PRAGMA cache_size=-64000;
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### 2. Hindari `Sync` Database Queries
|
|
133
|
+
Menggunakan fungsi bawaan `better-sqlite3` dengan eksekusi *sync* (seperti `db.prepare(query).run()`) dapat mem-blok *event loop* Node.js untuk mengeksekusi *callback* dari lib WhatsApp, menyebabkan ping-pong timeout.
|
|
134
|
+
Gunakan pendekatan koneksi SQLite *asynchronous* (`async/await`) atau *Worker Threads*.
|
|
135
|
+
|
|
136
|
+
### 3. Gunakan `addTransactionCapability`
|
|
137
|
+
Ratusan WhatsApp session menghasilkan jutaan Signal Keys selama pertukaran PreKey login. Menyimpan data satu-per-satu ke SQLite secara harfiah akan merusak login sinkronisasi Anda! Anda diwajibkan menggunakan pembungkus Native `addTransactionCapability` yang terdapat dalam library ini.
|
|
138
|
+
|
|
139
|
+
**Contoh Template Asinkron Auth Bot SQLite:**
|
|
140
|
+
```javascript
|
|
141
|
+
const { addTransactionCapability, initAuthCreds } = require('violetics');
|
|
142
|
+
|
|
143
|
+
// Membungkus Database Custom Anda ke Session Bot
|
|
144
|
+
function makeSqliteAuthState(dbConnection, sessionId) {
|
|
145
|
+
const state = {
|
|
146
|
+
get: async (type, ids) => {
|
|
147
|
+
// TODO: Ambil row dari tabel session secara `async`
|
|
148
|
+
// return dict { [id]: data }
|
|
149
|
+
},
|
|
150
|
+
set: async (data) => {
|
|
151
|
+
// TODO: Insert/Update row ke tabel SQLite secara `async`
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
// WAJIB: Membungkus transaksi Anda agar dieksekusi dalam bentuk 'Batch'
|
|
156
|
+
// Setiap transaksi Signal WhatsApp akan disimpan 100 sekaligus tanpa spam query DB
|
|
157
|
+
const keys = addTransactionCapability(state, console, {
|
|
158
|
+
maxCommitRetries: 10,
|
|
159
|
+
delayBetweenTriesMs: 3000
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
return {
|
|
163
|
+
state: {
|
|
164
|
+
creds: /* creds dari database dbConnection */,
|
|
165
|
+
keys
|
|
166
|
+
},
|
|
167
|
+
saveCreds: () => {
|
|
168
|
+
// Simpan perubahan kredensial
|
|
169
|
+
// Sebaiknya Anda buat fungsi "Debounce" disini selama 2 detik
|
|
170
|
+
// agar tidak menyebabkan CPU Spike saat Login Pertama Kali
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## 📥 Core Features
|
|
179
|
+
|
|
180
|
+
<details>
|
|
181
|
+
<summary><b>📤 Sending Messages</b></summary>
|
|
182
|
+
<br>
|
|
183
|
+
|
|
184
|
+
```javascript
|
|
185
|
+
// 1. Text message
|
|
186
|
+
await sock.sendMessage(jid, { text: 'Hello World!' });
|
|
187
|
+
|
|
188
|
+
// 2. Mention users
|
|
189
|
+
await sock.sendMessage(jid, {
|
|
190
|
+
text: 'Hello @12345678901!',
|
|
191
|
+
mentions: ['12345678901@s.whatsapp.net']
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
// 3. Send Media (Image)
|
|
195
|
+
await sock.sendMessage(jid, {
|
|
196
|
+
image: { url: './path/to/image.jpg' },
|
|
197
|
+
caption: 'Check out this image!'
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
// 4. Send Poll
|
|
201
|
+
await sock.sendMessage(jid, {
|
|
202
|
+
poll: {
|
|
203
|
+
name: 'Favorite Language?',
|
|
204
|
+
values: ['TypeScript', 'Python', 'Go'],
|
|
205
|
+
selectableCount: 1
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
```
|
|
209
|
+
</details>
|
|
210
|
+
|
|
211
|
+
<details>
|
|
212
|
+
<summary><b>👥 Group Management</b></summary>
|
|
213
|
+
<br>
|
|
214
|
+
|
|
215
|
+
```javascript
|
|
216
|
+
// 1. Create a group
|
|
217
|
+
const group = await sock.groupCreate('My Developer Group', ['123...@s.whatsapp.net']);
|
|
218
|
+
|
|
219
|
+
// 2. Modify participants (Add, Remove, Promote)
|
|
220
|
+
await sock.groupParticipantsUpdate(groupJid, ['123...@s.whatsapp.net'], 'add');
|
|
221
|
+
|
|
222
|
+
// 3. Update Group Info
|
|
223
|
+
await sock.groupUpdateSubject(groupJid, 'New Amazing Name');
|
|
224
|
+
await sock.groupUpdateDescription(groupJid, 'New description for the group');
|
|
225
|
+
```
|
|
226
|
+
</details>
|
|
227
|
+
|
|
228
|
+
<details>
|
|
229
|
+
<summary><b>📢 Newsletter (Channels) API</b></summary>
|
|
230
|
+
<br>
|
|
231
|
+
|
|
232
|
+
Full support for WhatsApp Newsletters (Channels). Manage, fetch, and react to channel updates!
|
|
233
|
+
|
|
234
|
+
```javascript
|
|
235
|
+
// 1. Fetch Newsletter by Invitelink/URL
|
|
236
|
+
const channelData = await sock.newsletterFromUrl('https://whatsapp.com/channel/0029...');
|
|
237
|
+
|
|
238
|
+
// 2. Follow / Unfollow a Channel
|
|
239
|
+
await sock.newsletterFollow(channelJid);
|
|
240
|
+
await sock.newsletterUnfollow(channelJid);
|
|
241
|
+
|
|
242
|
+
// 3. Mute / Unmute
|
|
243
|
+
await sock.newsletterMute(channelJid);
|
|
244
|
+
await sock.newsletterUnmute(channelJid);
|
|
245
|
+
|
|
246
|
+
// 4. Create a new Channel
|
|
247
|
+
const newChannel = await sock.newsletterCreate('My Channel', 'Description here', 'ALL');
|
|
248
|
+
|
|
249
|
+
// 5. Fetch Subscribed Channels & Messages
|
|
250
|
+
const mySubscriptions = await sock.newsletterFetchAllSubscribe();
|
|
251
|
+
console.log(mySubscriptions); // List of your followed newsletters
|
|
252
|
+
|
|
253
|
+
const messages = await sock.newsletterFetchMessages('get', channelJid, 50);
|
|
254
|
+
|
|
255
|
+
// 6. Update Channel Info
|
|
256
|
+
await sock.newsletterUpdateName(channelJid, 'New Name');
|
|
257
|
+
await sock.newsletterUpdateDescription(channelJid, 'New Description');
|
|
258
|
+
await sock.newsletterUpdatePicture(channelJid, buffer);
|
|
259
|
+
```
|
|
260
|
+
</details>
|
|
261
|
+
|
|
262
|
+
<details>
|
|
263
|
+
<summary><b>✨ Advanced Messages (Violetics)</b></summary>
|
|
264
|
+
<br>
|
|
265
|
+
|
|
266
|
+
Violetics implements advanced parsing and sending for native flow menus, albums, events, and unique status interactions directly through the `sock` instance!
|
|
267
|
+
|
|
268
|
+
```javascript
|
|
269
|
+
// 1. Send Interactive Message (Buttons & Media)
|
|
270
|
+
const interactive = await sock.handleInteractive(jid, {
|
|
271
|
+
interactiveMessage: {
|
|
272
|
+
title: "Main Menu",
|
|
273
|
+
footer: "Powered by Violetics",
|
|
274
|
+
header: "Select an option",
|
|
275
|
+
buttons: [
|
|
276
|
+
{ name: 'quick_reply', buttonParamsJson: '{"display_text":"Option 1","id":"opt1"}' },
|
|
277
|
+
{ name: 'cta_url', buttonParamsJson: '{"display_text":"Visit Site","url":"https://example.com"}' }
|
|
278
|
+
]
|
|
279
|
+
}
|
|
280
|
+
}, { quoted: messageObject }); // Pass quoting using the `options` object
|
|
281
|
+
|
|
282
|
+
await sock.relayMessage(jid, interactive.interactiveMessage, {});
|
|
283
|
+
|
|
284
|
+
// 2. Send Album (Multiple Media)
|
|
285
|
+
await sock.handleAlbum(jid, [
|
|
286
|
+
{ image: { url: './image1.jpg' } },
|
|
287
|
+
{ video: { url: './video1.mp4' } }
|
|
288
|
+
]);
|
|
289
|
+
|
|
290
|
+
// 3. Send Group / Private WhatsApp Status with Mentions
|
|
291
|
+
await sock.sendStatusWhatsApp(['12345678901@s.whatsapp.net', '12345678902-1234@g.us'], {
|
|
292
|
+
text: "Check out this status!",
|
|
293
|
+
backgroundColor: "#ff0000",
|
|
294
|
+
font: 1
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
// 4. Handle External Ad Replies, Payments, and Events natively!
|
|
298
|
+
await sock.handleEvent(jid, {
|
|
299
|
+
eventMessage: {
|
|
300
|
+
name: "Developer Meetup",
|
|
301
|
+
description: "Join us for coding!",
|
|
302
|
+
joinLink: "https://zoom.us/...",
|
|
303
|
+
startTime: Date.now(),
|
|
304
|
+
endTime: Date.now() + 3600000
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
```
|
|
308
|
+
</details>
|
|
309
|
+
|
|
310
|
+
---
|
|
311
|
+
|
|
312
|
+
## ⚖️ Legal Notice
|
|
313
|
+
|
|
314
|
+
**Disclaimer**: This project is **NOT** affiliated with, authorized, maintained, sponsored, or endorsed by WhatsApp LLC or any of its affiliates.
|
|
315
|
+
- This library is intended for strictly legitimate automation purposes.
|
|
316
|
+
- Do **NOT** use it for spamming, bulk reporting, or harassment.
|
|
317
|
+
- Users are solely responsible for compliance with WhatsApp's Terms of Service.
|
|
318
|
+
- The maintainers assume **NO** liability for any damages, legal actions, or account bans caused by the use of this software.
|