mod-baileys 1.0.1

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.
Files changed (107) hide show
  1. package/README.md +513 -0
  2. package/WAProto/index.js +169661 -0
  3. package/engine-requirements.js +10 -0
  4. package/lib/Defaults/baileys-version.json +3 -0
  5. package/lib/Defaults/index.js +147 -0
  6. package/lib/Defaults/phonenumber-mcc.json +223 -0
  7. package/lib/Signal/Group/ciphertext-message.js +15 -0
  8. package/lib/Signal/Group/group-session-builder.js +64 -0
  9. package/lib/Signal/Group/group_cipher.js +96 -0
  10. package/lib/Signal/Group/index.js +57 -0
  11. package/lib/Signal/Group/keyhelper.js +55 -0
  12. package/lib/Signal/Group/queue-job.js +57 -0
  13. package/lib/Signal/Group/sender-chain-key.js +34 -0
  14. package/lib/Signal/Group/sender-key-distribution-message.js +66 -0
  15. package/lib/Signal/Group/sender-key-message.js +69 -0
  16. package/lib/Signal/Group/sender-key-name.js +51 -0
  17. package/lib/Signal/Group/sender-key-record.js +53 -0
  18. package/lib/Signal/Group/sender-key-state.js +99 -0
  19. package/lib/Signal/Group/sender-message-key.js +29 -0
  20. package/lib/Signal/libsignal.js +174 -0
  21. package/lib/Socket/Client/abstract-socket-client.js +13 -0
  22. package/lib/Socket/Client/index.js +19 -0
  23. package/lib/Socket/Client/mobile-socket-client.js +65 -0
  24. package/lib/Socket/Client/web-socket-client.js +62 -0
  25. package/lib/Socket/business.js +260 -0
  26. package/lib/Socket/chats.js +970 -0
  27. package/lib/Socket/dew.js +591 -0
  28. package/lib/Socket/groups.js +317 -0
  29. package/lib/Socket/index.js +11 -0
  30. package/lib/Socket/messages-recv.js +1110 -0
  31. package/lib/Socket/messages-send.js +913 -0
  32. package/lib/Socket/newsletter.js +329 -0
  33. package/lib/Socket/registration.js +166 -0
  34. package/lib/Socket/socket.js +664 -0
  35. package/lib/Socket/usync.js +70 -0
  36. package/lib/Store/index.js +10 -0
  37. package/lib/Store/make-cache-manager-store.js +83 -0
  38. package/lib/Store/make-in-memory-store.js +427 -0
  39. package/lib/Store/make-ordered-dictionary.js +81 -0
  40. package/lib/Store/object-repository.js +27 -0
  41. package/lib/Types/Auth.js +2 -0
  42. package/lib/Types/Call.js +2 -0
  43. package/lib/Types/Chat.js +4 -0
  44. package/lib/Types/Contact.js +2 -0
  45. package/lib/Types/Events.js +2 -0
  46. package/lib/Types/GroupMetadata.js +2 -0
  47. package/lib/Types/Label.js +27 -0
  48. package/lib/Types/LabelAssociation.js +9 -0
  49. package/lib/Types/Message.js +9 -0
  50. package/lib/Types/Newsletter.js +38 -0
  51. package/lib/Types/Product.js +2 -0
  52. package/lib/Types/Signal.js +2 -0
  53. package/lib/Types/Socket.js +2 -0
  54. package/lib/Types/State.js +2 -0
  55. package/lib/Types/USync.js +2 -0
  56. package/lib/Types/index.js +42 -0
  57. package/lib/Utils/auth-utils.js +206 -0
  58. package/lib/Utils/baileys-event-stream.js +63 -0
  59. package/lib/Utils/business.js +234 -0
  60. package/lib/Utils/chat-utils.js +729 -0
  61. package/lib/Utils/crypto.js +151 -0
  62. package/lib/Utils/decode-wa-message.js +198 -0
  63. package/lib/Utils/event-buffer.js +514 -0
  64. package/lib/Utils/generics.js +423 -0
  65. package/lib/Utils/history.js +96 -0
  66. package/lib/Utils/index.js +33 -0
  67. package/lib/Utils/link-preview.js +93 -0
  68. package/lib/Utils/logger.js +7 -0
  69. package/lib/Utils/lt-hash.js +51 -0
  70. package/lib/Utils/make-mutex.js +43 -0
  71. package/lib/Utils/messages-media.js +819 -0
  72. package/lib/Utils/messages.js +816 -0
  73. package/lib/Utils/noise-handler.js +155 -0
  74. package/lib/Utils/process-message.js +321 -0
  75. package/lib/Utils/signal.js +153 -0
  76. package/lib/Utils/use-multi-file-auth-state.js +119 -0
  77. package/lib/Utils/validate-connection.js +229 -0
  78. package/lib/WABinary/constants.js +40 -0
  79. package/lib/WABinary/decode.js +252 -0
  80. package/lib/WABinary/encode.js +265 -0
  81. package/lib/WABinary/generic-utils.js +198 -0
  82. package/lib/WABinary/index.js +21 -0
  83. package/lib/WABinary/jid-utils.js +62 -0
  84. package/lib/WABinary/types.js +2 -0
  85. package/lib/WAM/BinaryInfo.js +13 -0
  86. package/lib/WAM/constants.js +15350 -0
  87. package/lib/WAM/encode.js +155 -0
  88. package/lib/WAM/index.js +19 -0
  89. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +9 -0
  90. package/lib/WAUSync/Protocols/USyncContactProtocol.js +32 -0
  91. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +22 -0
  92. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +57 -0
  93. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +12 -0
  94. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +30 -0
  95. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +12 -0
  96. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +42 -0
  97. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +25 -0
  98. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +53 -0
  99. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +8 -0
  100. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +24 -0
  101. package/lib/WAUSync/Protocols/index.d.ts +4 -0
  102. package/lib/WAUSync/Protocols/index.js +20 -0
  103. package/lib/WAUSync/USyncQuery.js +89 -0
  104. package/lib/WAUSync/USyncUser.js +26 -0
  105. package/lib/WAUSync/index.js +19 -0
  106. package/lib/index.js +47 -0
  107. package/package.json +106 -0
package/README.md ADDED
@@ -0,0 +1,513 @@
1
+ <div align="center">
2
+ <img src="https://capsule-render.vercel.app/api?type=speech&height=300&color=gradient&text=MOD%20BAIYLES&animation=blinking" width="100%">
3
+ </div>
4
+ <br>
5
+ <div align="center">
6
+ <div style="background: linear-gradient(90deg, #6366F1, #3B82F6, #2DD4BF); padding: 8px; border-radius: 10px; margin: 15px 0;">
7
+ <span style="font-size: 18px; font-weight: bold; color: white;"><b>🔥Ultimate WhatsApp Web API<b></span>
8
+ </div>
9
+
10
+ ![TypeScript](https://img.shields.io/badge/-%F0%9F%94%B7%20TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white&labelColor=0D1117)
11
+ ![JavaScript](https://img.shields.io/badge/-%F0%9F%94%B8%20JavaScript-F7DF1E?style=for-the-badge&logo=javascript&logoColor=F7DF1E&labelColor=0D1117)
12
+ ![WhatsApp](https://img.shields.io/badge/-%F0%9F%92%AC%20WhatsApp-25D366?style=for-the-badge&logo=whatsapp&logoColor=white&labelColor=0D1117)
13
+ ![NPM](https://img.shields.io/badge/-%F0%9F%93%A6%20npm-CB3837?style=for-the-badge&logo=npm&logoColor=white&labelColor=0D1117)
14
+
15
+ <p>
16
+ <!-- NPM Version -->
17
+ <a href="https://www.npmjs.com/package/mod-baileys">
18
+ <img src="https://img.shields.io/npm/v/mod-baileys?color=blueviolet&label=version&logo=npm" alt="npm version" />
19
+ </a>
20
+
21
+ <!-- NPM Downloads -->
22
+ <a href="https://www.npmjs.com/package/mod-baileys">
23
+ <img src="https://img.shields.io/npm/dt/mod-baileys?color=blueviolet&label=downloads&logo=npm" alt="npm downloads" />
24
+ </a>
25
+
26
+ <!-- License -->
27
+ <a href="https://www.npmjs.com/package/mod-baileys">
28
+ <img src="https://img.shields.io/npm/l/mod-baileys?color=success&label=license" alt="license" />
29
+ </a>
30
+
31
+ <!-- Bundle Size -->
32
+ <a href="https://bundlephobia.com/package/mod-baileys">
33
+ <img src="https://img.shields.io/bundlephobia/min/mod-baileys?label=minified%20size&color=orange" alt="bundle size" />
34
+ </a>
35
+
36
+ <!-- Gzip Bundle Size -->
37
+ <a href="https://bundlephobia.com/package/mod-baileys">
38
+ <img src="https://img.shields.io/bundlephobia/minzip/mod-baileys?label=minzip%20size&color=orange" alt="gzip bundle size" />
39
+ </a>
40
+
41
+ <!-- PackagePhobia Install Size -->
42
+ <a href="https://packagephobia.com/result?p=mod-baileys">
43
+ <img src="https://packagephobia.com/badge?p=mod-baileys" alt="install size" />
44
+ </a>
45
+
46
+ <!-- Code Quality (Codacy) -->
47
+ <a href="https://app.codacy.com">
48
+ <img src="https://img.shields.io/badge/Codacy-Quality%20Check-blue?logo=codacy" alt="Codacy quality" />
49
+ </a>
50
+
51
+ <!-- Security Scan (Snyk) -->
52
+ <a href="https://snyk.io">
53
+ <img src="https://img.shields.io/badge/Snyk-Security%20Scan-purple?logo=snyk" alt="Snyk security" />
54
+ </a>
55
+
56
+ <!-- Node Engine Support -->
57
+ <img src="https://img.shields.io/node/v/mod-baileys?label=node%21engine" alt="node engine" />
58
+
59
+ <!-- Types -->
60
+ <img src="https://img.shields.io/npm/types/mod-baileys?label=types" alt="types" />
61
+ </p>
62
+
63
+ </div>
64
+
65
+
66
+ <div align="center">
67
+ <img src="https://capsule-render.vercel.app/api?type=waving&color=gradient&height=60&section=header" width="100%">
68
+ </div>
69
+ <div align="center">
70
+ <div style="border-left: 4px solid #3B82F6; padding-left: 15px; margin: 25px 0;">
71
+ <h2>2026 BEST BAILEYS RELEASE</h2>
72
+ <p><i>Elevate your messaging experience with the most advanced WhatsApp Web API solution available</i></p>
73
+ </div></div></div>
74
+
75
+
76
+ ---
77
+
78
+ ## ❓️ | WHY USE MOD-BAILEYS?
79
+
80
+ <div style="display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 10px; margin: 20px 0;">
81
+ <div style="background: rgba(45, 212, 191, 0.1); border-radius: 10px; padding: 15px; width: 180px; text-align: center;">
82
+ <div style="font-weight: bold;">⚡ Lightning Fast</div>
83
+ </div>
84
+ <div style="background: rgba(99, 102, 241, 0.1); border-radius: 10px; padding: 15px; width: 180px; text-align: center;">
85
+ <div style="font-weight: bold;">🛡️ Secure</div>
86
+ </div>
87
+ <div style="background: rgba(244, 114, 182, 0.1); border-radius: 10px; padding: 15px; width: 180px; text-align: center;">
88
+ <div style="font-weight: bold;">🧩 Feature-Rich</div>
89
+ </div>
90
+ <div style="background: rgba(234, 179, 8, 0.1); border-radius: 10px; padding: 15px; width: 180px; text-align: center;">
91
+ <div style="font-weight: bold;">🔄 Active Development</div>
92
+ </div>
93
+ </div>
94
+
95
+ ## 📌 | IMPORTANT NOTE
96
+
97
+ <div style="background: linear-gradient(90deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05)); border-left: 4px solid #EF4444; padding: 15px; border-radius: 5px; margin: 20px 0;">
98
+ <p>⚠️ The original repository was initially removed by its creator and subsequently taken over by <a href="https://github.com/WhiskeySockets" style="color: #60A5FA; text-decoration: none; font-weight: bold;">WhiskeySockets</a>. This enhanced version includes numerous improvements and powerful new features designed to transform your WhatsApp development experience.</p>
99
+ </div>
100
+
101
+ ## 💫 | INSTALLATION
102
+
103
+ <div style="background: rgba(17, 24, 39, 0.6); border-radius: 8px; padding: 20px; margin: 20px 0;">
104
+
105
+ ### 📂 In package.json:
106
+ ```json
107
+ "dependencies": {
108
+ "mod-baileys": "*"
109
+ }
110
+ ```
111
+ or option2
112
+ ### 📂 In package.json:
113
+ ```json
114
+ "dependencies": {
115
+ "@whiskeysockets/baileys": "github:dew-coders/mod-baileys"
116
+ }
117
+ ```
118
+
119
+
120
+ ### ⚙️ Terminal Installation:
121
+ ```bash
122
+ npm install mod-baileys
123
+ ```
124
+
125
+ ### 🔌 Import:
126
+ <div style="display: flex; gap: 20px; flex-wrap: wrap;">
127
+ <div style="background: rgba(6, 182, 212, 0.1); border-radius: 5px; padding: 10px; flex: 1;">
128
+
129
+ ```typescript
130
+ // ESM
131
+ import makeWASocket from 'dew-baileys'
132
+ ```
133
+ </div>
134
+ <div style="background: rgba(234, 179, 8, 0.1); border-radius: 5px; padding: 10px; flex: 1;">
135
+
136
+ ```javascript
137
+ // CommonJS
138
+ const { default: makeWASocket } = require("dew-baileys")
139
+ ```
140
+ </div>
141
+ </div>
142
+ </div>
143
+
144
+ # How To Connect To Whatsapp
145
+ ## With QR Code
146
+ ```javascript
147
+ const {
148
+ default: makeWASocket
149
+ } = require('@whiskeysockets/baileys');
150
+
151
+ const client = makeWASocket({
152
+ browser: ['Ubuntu', 'Chrome', '20.00.1'],
153
+ printQRInTerminal: true
154
+ })
155
+ ```
156
+
157
+ ## Connect With Number
158
+ ```javascript
159
+ const {
160
+ default: makeWASocket,
161
+ fetchLatestWAWebVersion
162
+ } = require('@whiskeysockets/baileys');
163
+
164
+ const client = makeWASocket({
165
+ browser: ['Ubuntu', 'Chrome', '20.00.1'],
166
+ printQRInTerminal: false,
167
+ version: fetchLatestWAWebVersion()
168
+ // Other options
169
+ });
170
+
171
+ const number = "628XXXXX";
172
+ const code = await client.requestPairingCode(number.trim) /* Use : (number, "YYYYYYYY") for custom-pairing */
173
+
174
+ console.log("Ur pairing code : " + code)
175
+ ```
176
+
177
+
178
+ ## ✨ | FEATURE SHOWCASE
179
+
180
+ <div style="background: linear-gradient(45deg, rgba(124, 58, 237, 0.05), rgba(139, 92, 246, 0.05)); border-radius: 10px; padding: 15px; margin: 20px 0;">
181
+
182
+ ### 🎀 Enhanced Features Matrix
183
+
184
+ | Feature | Description | Status |
185
+ |---------|-------------|--------|
186
+ | 🔊 **Channel Messaging** | Send & manage WhatsApp channel content | ✅ |
187
+ | 🎛️ **Interactive Messages** | Create rich button-based experiences | ✅ |
188
+ | 🤖 **AI Message Icon** | Brand your bot messages with AI icon | ✅ |
189
+ | 🖼️ **Enhanced Media** | Uncropped profile pictures & optimized media | ✅ |
190
+ | 🔐 **Custom Pairing** | Personalized device pairing codes | ✅ |
191
+ | 🔧 **Performance Optimizations** | Cleaner logs & improved signal handling | ✅ |
192
+ | 📱 **Cross-Platform** | Works on all NodeJS supported platforms | ✅ |
193
+
194
+ </div>
195
+
196
+ <br>
197
+
198
+ <div style="display: flex; justify-content: center; margin: 30px 0;">
199
+ <div style="background: linear-gradient(135deg, #0EA5E9, #2DD4BF); color: white; padding: 12px 25px; border-radius: 25px; font-weight: bold; font-size: 16px;">🌱 SMALL BUT POWERFUL FEATURES 🎉</div>
200
+ </div>
201
+
202
+ ## 📰 | NEWSLETTER MANAGEMENT
203
+
204
+ <details>
205
+ <summary style="background: linear-gradient(90deg, #4F46E5, #7C3AED); color: white; padding: 10px 15px; border-radius: 5px; cursor: pointer; font-weight: bold;">📚 Expand Newsletter Features</summary>
206
+
207
+ <div style="padding: 15px; background: rgba(79, 70, 229, 0.05); border-radius: 0 0 10px 10px; margin-top: -5px;">
208
+
209
+ ### 📊 Get Newsletter Info
210
+ ```typescript
211
+ // By invite
212
+ const metadata = await sock.newsletterMetadata("invite", "xxxxx")
213
+ // By JID
214
+ const metadata = await sock.newsletterMetadata("jid", "abcd@newsletter")
215
+ console.log(metadata)
216
+ ```
217
+
218
+ ### 📝 Update Newsletter Content
219
+ ```typescript
220
+ // Update description
221
+ await sock.newsletterUpdateDescription("abcd@newsletter", "New Description")
222
+
223
+ // Update name
224
+ await sock.newsletterUpdateName("abcd@newsletter", "New Name")
225
+
226
+ // Update picture
227
+ await sock.newsletterUpdatePicture("abcd@newsletter", buffer)
228
+
229
+ // Remove picture
230
+ await sock.newsletterRemovePicture("abcd@newsletter")
231
+ ```
232
+
233
+ ### 🔔 Notification Management
234
+ ```typescript
235
+ // Unmute newsletter
236
+ await sock.newsletterUnmute("abcd@newsletter")
237
+
238
+ // Mute newsletter
239
+ await sock.newsletterMute("abcd@newsletter")
240
+ ```
241
+
242
+ ### 🔄 Newsletter Management
243
+ ```typescript
244
+ // Create new newsletter
245
+ const metadata = await sock.newsletterCreate("Newsletter Name", "Newsletter Description")
246
+ console.log(metadata)
247
+
248
+ // Delete newsletter
249
+ await sock.newsletterDelete("abcd@newsletter")
250
+
251
+ // Follow newsletter
252
+ await sock.newsletterFollow("abcd@newsletter")
253
+
254
+ // Unfollow newsletter
255
+ await sock.newsletterUnfollow("abcd@newsletter")
256
+ ```
257
+
258
+ ### 😀 Engagement Features
259
+ ```typescript
260
+ // Send reaction to newsletter post
261
+ // Get ID from message URL: https://whatsapp.com/channel/xxxxx/175
262
+ const id = "175"
263
+ await sock.newsletterReactMessage("abcd@newsletter", id, "🥳")
264
+ ```
265
+
266
+ </div>
267
+ </details>
268
+
269
+ ## 🎛️ | INTERACTIVE MESSAGING
270
+
271
+ <details>
272
+ <summary style="background: linear-gradient(90deg, #EC4899, #F43F5E); color: white; padding: 10px 15px; border-radius: 5px; cursor: pointer; font-weight: bold;">🎯 Expand Button & Interactive Features</summary>
273
+
274
+ <div style="padding: 15px; background: rgba(236, 72, 153, 0.05); border-radius: 0 0 10px 10px; margin-top: -5px;">
275
+
276
+ ### 📝 Text Buttons
277
+ ```typescript
278
+ const buttons = [
279
+ { buttonId: 'id1', buttonText: { displayText: 'Button 1' }, type: 1 },
280
+ { buttonId: 'id2', buttonText: { displayText: 'Button 2' }, type: 1 }
281
+ ]
282
+
283
+ const buttonMessage = {
284
+ text: "Hi it's button message",
285
+ footer: 'Hello World',
286
+ buttons,
287
+ headerType: 1,
288
+ viewOnce: true
289
+ }
290
+
291
+ await sock.sendMessage(id, buttonMessage, { quoted: null })
292
+ ```
293
+
294
+ ### 🖼️ Image Buttons
295
+ ```typescript
296
+ const buttons = [
297
+ { buttonId: 'id1', buttonText: { displayText: 'Button 1' }, type: 1 },
298
+ { buttonId: 'id2', buttonText: { displayText: 'Button 2' }, type: 1 }
299
+ ]
300
+
301
+ const buttonMessage = {
302
+ image: { url: "https://example.com/abcd.jpg" }, // image: buffer or path
303
+ caption: "Hi it's button message with image",
304
+ footer: 'Hello World',
305
+ buttons,
306
+ headerType: 1,
307
+ viewOnce: true
308
+ }
309
+
310
+ await sock.sendMessage(id, buttonMessage, { quoted: null })
311
+ ```
312
+
313
+ ### 🎬 Video Buttons
314
+ ```typescript
315
+ const buttons = [
316
+ { buttonId: 'id1', buttonText: { displayText: 'Button 1' }, type: 1 },
317
+ { buttonId: 'id2', buttonText: { displayText: 'Button 2' }, type: 1 }
318
+ ]
319
+
320
+ const buttonMessage = {
321
+ video: { url: "https://example.com/abcd.mp4" }, // video: buffer or path
322
+ caption: "Hi it's button message with video",
323
+ footer: 'Hello World',
324
+ buttons,
325
+ headerType: 1,
326
+ viewOnce: true
327
+ }
328
+
329
+ await sock.sendMessage(id, buttonMessage, { quoted: null })
330
+ ```
331
+
332
+ ### 🔄 Advanced Interactive Messages
333
+ ```typescript
334
+ const interactiveButtons = [
335
+ {
336
+ name: "quick_reply",
337
+ buttonParamsJson: JSON.stringify({
338
+ display_text: "Quick Reply",
339
+ id: "ID"
340
+ })
341
+ },
342
+ {
343
+ name: "cta_url",
344
+ buttonParamsJson: JSON.stringify({
345
+ display_text: "Tap Here!",
346
+ url: "https://www.example.com/"
347
+ })
348
+ },
349
+ {
350
+ name: "cta_copy",
351
+ buttonParamsJson: JSON.stringify({
352
+ display_text: "Copy Code",
353
+ id: "12345",
354
+ copy_code: "12345"
355
+ })
356
+ }
357
+ ]
358
+
359
+ const interactiveMessage = {
360
+ text: "Hello World!",
361
+ title: "this is the title",
362
+ footer: "this is the footer",
363
+ interactiveButtons
364
+ }
365
+
366
+ await sock.sendMessage(id, interactiveMessage, { quoted: null })
367
+ ```
368
+
369
+ ### 🖼️ Rich Media Interactive Messages
370
+ ```typescript
371
+ const interactiveButtons = [
372
+ {
373
+ name: "quick_reply",
374
+ buttonParamsJson: JSON.stringify({
375
+ display_text: "Quick Reply",
376
+ id: "ID"
377
+ })
378
+ },
379
+ {
380
+ name: "cta_url",
381
+ buttonParamsJson: JSON.stringify({
382
+ display_text: "Visit Website",
383
+ url: "https://www.example.com/"
384
+ })
385
+ }
386
+ ]
387
+
388
+ // With Image
389
+ const imageInteractiveMessage = {
390
+ image: { url: "https://example.com/abcd.jpg" },
391
+ caption: "Check out this amazing photo!",
392
+ title: "Photo Showcase",
393
+ footer: "Tap a button below",
394
+ interactiveButtons
395
+ }
396
+
397
+ await sock.sendMessage(id, imageInteractiveMessage, { quoted: null })
398
+
399
+ // With Video
400
+ const videoInteractiveMessage = {
401
+ video: { url: "https://example.com/abcd.mp4" },
402
+ caption: "Watch this awesome video!",
403
+ title: "Video Showcase",
404
+ footer: "Tap a button below",
405
+ interactiveButtons
406
+ }
407
+
408
+ await sock.sendMessage(id, videoInteractiveMessage, { quoted: null })
409
+ ```
410
+
411
+ </div>
412
+ </details>
413
+
414
+ ## 🤖 | AI MESSAGING
415
+
416
+ <div style="background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1)); border-radius: 10px; padding: 20px; margin: 20px 0;">
417
+
418
+ ### AI Icon Feature
419
+ ```typescript
420
+ // Simply add "ai: true" to display AI icon with your message
421
+ await sock.sendMessage(id, { text: "Hello! I'm your AI assistant.", ai: true })
422
+ ```
423
+
424
+ <div style="background: rgba(16, 185, 129, 0.2); border-radius: 5px; padding: 10px; margin-top: 15px;">
425
+ <strong>💡 Pro Tip:</strong> AI icons make your bot messages stand out and indicate automated responses to users.
426
+ </div>
427
+
428
+ </div>
429
+
430
+ ## 🔐 | CUSTOM PAIRING
431
+
432
+ <div style="background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.1)); border-radius: 10px; padding: 20px; margin: 20px 0;">
433
+
434
+ ### Custom Code Implementation
435
+ ```typescript
436
+ if(usePairingCode && !sock.authState.creds.registered) {
437
+ const phoneNumber = await question('Please enter your mobile phone number:\n')
438
+ const custom = "DEWMDOFC" // must be 8 digits, can be letters or numbers
439
+ const code = await sock.requestPairingCode(phoneNumber, custom)
440
+ console.log(`Pairing code: ${code?.match(/.{1,4}/g)?.join('-') || code}`)
441
+ }
442
+ ```
443
+
444
+ <div style="background: rgba(245, 158, 11, 0.2); border-radius: 5px; padding: 10px; margin-top: 15px;">
445
+ <strong>🔒 Security Note:</strong> Custom pairing codes enhance security while providing a personalized experience.
446
+ </div>
447
+
448
+ </div>
449
+
450
+ <div align="center">
451
+ <img src="https://capsule-render.vercel.app/api?type=rect&color=gradient&height=2&section=header" width="100%">
452
+ </div>
453
+
454
+ ## 🛠️ | QUICK IMPLEMENTATION GUIDE
455
+
456
+ <div style="display: flex; flex-wrap: wrap; gap: 15px; margin: 20px 0;">
457
+ <div style="flex: 1; min-width: 250px; background: rgba(59, 130, 246, 0.05); border-radius: 10px; padding: 15px;">
458
+ <h3>🚀 Step 1: Install</h3>
459
+ <p>Add baileys-elite to your project using npm</p>
460
+ <div style="background: rgba(0, 0, 0, 0.2); padding: 10px; border-radius: 5px;">
461
+ <code>npm install dew-baileys</code>
462
+ </div>
463
+ </div>
464
+
465
+ <div style="flex: 1; min-width: 250px; background: rgba(59, 130, 246, 0.05); border-radius: 10px; padding: 15px;">
466
+ <h3>🔄 Step 2: Import</h3>
467
+ <p>Import the library into your project</p>
468
+ <div style="background: rgba(0, 0, 0, 0.2); padding: 10px; border-radius: 5px;">
469
+ <code>import makeWASocket from 'dew-baileys'</code>
470
+ </div>
471
+ </div>
472
+
473
+ <div style="flex: 1; min-width: 250px; background: rgba(59, 130, 246, 0.05); border-radius: 10px; padding: 15px;">
474
+ <h3>⚙️ Step 3: Configure</h3>
475
+ <p>Set up your WhatsApp connection</p>
476
+ <div style="background: rgba(0, 0, 0, 0.2); padding: 10px; border-radius: 5px;">
477
+ <code>const sock = makeWASocket({...})</code>
478
+ </div>
479
+ </div>
480
+
481
+ <div style="flex: 1; min-width: 250px; background: rgba(59, 130, 246, 0.05); border-radius: 10px; padding: 15px;">
482
+ <h3>🚀 Step 4: Implement</h3>
483
+ <p>Start using the enhanced features</p>
484
+ <div style="background: rgba(0, 0, 0, 0.2); padding: 10px; border-radius: 5px;">
485
+ <code>await sock.sendMessage(id, {...})</code>
486
+ </div>
487
+ </div>
488
+ </div>
489
+
490
+ ## 🐛 | REPORTING ISSUES
491
+
492
+ <div style="background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(220, 38, 38, 0.05)); border-radius: 10px; padding: 20px; margin: 20px 0;">
493
+ <h3>Found a bug? Have a suggestion?</h3>
494
+ <p>If you encounter any issues while using this repository, please feel free to open a <a href="https://github.com/dew-coders/Dew-Baileys/issues" style="color: #60A5FA; text-decoration: none; font-weight: bold;">new issue</a>.</p>
495
+
496
+ <div style="display: flex; align-items: center; gap: 10px; margin-top: 15px; background: rgba(239, 68, 68, 0.1); padding: 10px; border-radius: 5px;">
497
+ <span style="font-size: 24px;">👾</span>
498
+ <span>Our team actively monitors and responds to all issues.</span>
499
+ </div>
500
+ </div>
501
+
502
+ ## 📝 | NOTES
503
+
504
+ <div style="background: linear-gradient(135deg, rgba(107, 114, 128, 0.05), rgba(75, 85, 99, 0.05)); border-radius: 10px; padding: 20px; margin: 20px 0;">
505
+ <p>Everything other than the modifications mentioned above remains the same as the original repository. You can check out the original repository at <a href="https://github.com/WhiskeySockets/Baileys" style="color: #60A5FA; text-decoration: none; font-weight: bold;">WhiskeySockets</a>.</p>
506
+ </div>
507
+
508
+
509
+ <p style="font-style: italic; max-width: 600px; margin: 0 auto;">Powered BY Dew Coders - The Ultimate WhatsApp Web API Experience</p>
510
+ </div>
511
+ <div align="center">
512
+ <img src="https://capsule-render.vercel.app/api?type=waving&color=gradient&height=100&section=footer" width="100%">
513
+ </div>