@itsliaaa/baileys 0.1.2 â 0.1.4
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 +57 -69
- package/WAProto/index.js +1188 -244
- package/lib/Defaults/index.js +1 -1
- package/lib/Socket/messages-send.js +6 -11
- package/lib/Socket/socket.js +1 -2
- package/lib/Utils/generics.js +1 -1
- package/lib/Utils/messages.js +37 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,21 +8,21 @@ A lightweight fork of Baileys with a few fixes and a small adjustment.
|
|
|
8
8
|
|
|
9
9
|
#### đ ď¸ Internal Adjustments
|
|
10
10
|
- đźď¸ Fixed an issue where media could not be sent to newsletters due to an upstream issue.
|
|
11
|
-
- đ Reintroduced `makeInMemoryStore` with a minimal ESM adaptation and small adjustments for Baileys v7.
|
|
11
|
+
- đ Reintroduced [`makeInMemoryStore`](#%EF%B8%8F-implementing-a-data-store) with a minimal ESM adaptation and small adjustments for Baileys v7.
|
|
12
12
|
- đŚ Switched FFmpeg execution from `exec` to `spawn` for safer process handling.
|
|
13
13
|
- đď¸ Added `@napi-rs/image` as a supported image processing backend in `getImageProcessingLibrary()`, offering a balance between performance and compatibility.
|
|
14
14
|
|
|
15
15
|
#### đ¨ Message Handling & Compatibility
|
|
16
|
-
- đđť Added support for sending interactive message types (button, list, interactive, template, carousel).
|
|
17
|
-
- đŠ Added support for album messages, group status messages, sticker pack messages, and several payment-related messages (request payment, payment invite, order, invoice).
|
|
18
|
-
- đ° Simplified sending messages with ad thumbnails via `externalAdReply` without requiring manual `contextInfo`.
|
|
16
|
+
- đđť Added support for sending [interactive message](#-sending-interactive-messages) types (button, list, interactive, template, carousel).
|
|
17
|
+
- đŠ Added support for [album messages](#%EF%B8%8F-album-image--video), [group status messages](#4%EF%B8%8FâŁ-group-status), [sticker pack messages](#-sticker-pack), and several [payment-related messages](#-sending-payment-messages) (request payment, payment invite, order, invoice).
|
|
18
|
+
- đ° Simplified sending messages with ad thumbnails via [`externalAdReply`](#3%EF%B8%8FâŁ-external-ad-reply) without requiring manual `contextInfo`.
|
|
19
19
|
|
|
20
20
|
#### đ§Š Additional Message Options
|
|
21
21
|
- đď¸ Added optional boolean flags for message handling:
|
|
22
|
-
- `ai` - AI label on message
|
|
23
|
-
- `mentionAll` - Mentions all group participants without requiring their JIDs in `mentions` or `mentionedJid`
|
|
24
|
-
- `ephemeral
|
|
25
|
-
- `raw` - Build your message manually **(DO NOT USE FOR EXPLOITATION)**
|
|
22
|
+
- [`ai`](#1%EF%B8%8FâŁ-ai-label) - AI label on message
|
|
23
|
+
- [`mentionAll`](#-mention) - Mentions all group participants without requiring their JIDs in `mentions` or `mentionedJid`
|
|
24
|
+
- [`ephemeral`](#2%EF%B8%8FâŁ-ephemeral), [`groupStatus`](#4%EF%B8%8FâŁ-group-status), [`viewOnceV2`](#7%EF%B8%8FâŁ-view-once-v2), [`viewOnceV2Extension`](#8%EF%B8%8FâŁ-view-once-v2-extension), [`interactiveAsTemplate`](#3%EF%B8%8FâŁ-interactive) - Message wrappers
|
|
25
|
+
- [`raw`](#5%EF%B8%8FâŁ-raw) - Build your message manually **(DO NOT USE FOR EXPLOITATION)**
|
|
26
26
|
|
|
27
27
|
> [!NOTE]
|
|
28
28
|
đ This project is maintained with limited scope and is not intended to replace upstream Baileys.
|
|
@@ -224,17 +224,15 @@ sock.sendMessage(jid, {
|
|
|
224
224
|
##### đ Mention
|
|
225
225
|
|
|
226
226
|
```javascript
|
|
227
|
+
// --- Regular mention
|
|
227
228
|
sock.sendMessage(jid, {
|
|
228
229
|
text: 'đđť Hello @628123456789',
|
|
229
230
|
mentions: ['628123456789@s.whatsapp.net']
|
|
230
231
|
}, {
|
|
231
232
|
quoted: message
|
|
232
233
|
})
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
##### đ§âđ§âđ§âđ§ Mention All
|
|
236
234
|
|
|
237
|
-
|
|
235
|
+
// --- Mention all
|
|
238
236
|
sock.sendMessage(jid, {
|
|
239
237
|
text: 'đđť Hello @all',
|
|
240
238
|
mentionAll: true
|
|
@@ -331,7 +329,7 @@ sock.sendMessage('1211111111111@newsletter', {
|
|
|
331
329
|
quoted: message
|
|
332
330
|
})
|
|
333
331
|
|
|
334
|
-
// Poll result
|
|
332
|
+
// --- Poll result
|
|
335
333
|
sock.sendMessage(jid, {
|
|
336
334
|
pollResult: {
|
|
337
335
|
name: 'đ Poll Result',
|
|
@@ -348,7 +346,7 @@ sock.sendMessage(jid, {
|
|
|
348
346
|
quoted: message
|
|
349
347
|
})
|
|
350
348
|
|
|
351
|
-
// Poll update
|
|
349
|
+
// --- Poll update
|
|
352
350
|
sock.sendMessage(jid, {
|
|
353
351
|
pollUpdate: {
|
|
354
352
|
metadata: {},
|
|
@@ -454,7 +452,7 @@ sock.sendMessage(jid, {
|
|
|
454
452
|
##### đŚ Sticker Pack
|
|
455
453
|
|
|
456
454
|
> [!IMPORTANT]
|
|
457
|
-
If
|
|
455
|
+
If `sharp` or `@napi-rs/image` is not installed, the `cover` and `stickers` must already be in WebP format.
|
|
458
456
|
|
|
459
457
|
```javascript
|
|
460
458
|
sock.sendMessage(jid, {
|
|
@@ -484,9 +482,10 @@ sock.sendMessage(jid, {
|
|
|
484
482
|
|
|
485
483
|
#### đđť Sending Interactive Messages
|
|
486
484
|
|
|
487
|
-
##### 1ď¸âŁ Buttons
|
|
485
|
+
##### 1ď¸âŁ Buttons
|
|
488
486
|
|
|
489
487
|
```javascript
|
|
488
|
+
// --- Regular buttons message
|
|
490
489
|
sock.sendMessage(jid, {
|
|
491
490
|
text: 'đđť Buttons!',
|
|
492
491
|
footer: '@itsliaaa/baileys',
|
|
@@ -497,11 +496,8 @@ sock.sendMessage(jid, {
|
|
|
497
496
|
}, {
|
|
498
497
|
quoted: message
|
|
499
498
|
})
|
|
500
|
-
```
|
|
501
499
|
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
```javascript
|
|
500
|
+
// --- Buttons with Media & Native Flow
|
|
505
501
|
sock.sendMessage(jid, {
|
|
506
502
|
image: {
|
|
507
503
|
url: './path/to/image.jpg'
|
|
@@ -512,35 +508,32 @@ sock.sendMessage(jid, {
|
|
|
512
508
|
text: 'đđť Rating',
|
|
513
509
|
id: '#Rating'
|
|
514
510
|
}, {
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
title: '
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
description: '',
|
|
533
|
-
id: '#CouponCode'
|
|
534
|
-
}]
|
|
511
|
+
text: 'đ Select',
|
|
512
|
+
sections: [{
|
|
513
|
+
title: '⨠Section 1',
|
|
514
|
+
rows: [{
|
|
515
|
+
header: '',
|
|
516
|
+
title: 'đ Secret Ingredient',
|
|
517
|
+
description: '',
|
|
518
|
+
id: '#SecretIngredient'
|
|
519
|
+
}]
|
|
520
|
+
}, {
|
|
521
|
+
title: '⨠Section 2',
|
|
522
|
+
highlight_label: 'đĽ Popular',
|
|
523
|
+
rows: [{
|
|
524
|
+
header: '',
|
|
525
|
+
title: 'đˇď¸ Coupon',
|
|
526
|
+
description: '',
|
|
527
|
+
id: '#CouponCode'
|
|
535
528
|
}]
|
|
536
|
-
}
|
|
529
|
+
}]
|
|
537
530
|
}]
|
|
538
531
|
}, {
|
|
539
532
|
quoted: message
|
|
540
533
|
})
|
|
541
534
|
```
|
|
542
535
|
|
|
543
|
-
##### 2ď¸âŁ List
|
|
536
|
+
##### 2ď¸âŁ List
|
|
544
537
|
|
|
545
538
|
> [!NOTE]
|
|
546
539
|
It only works in private chat (`@s.whatsapp.net`).
|
|
@@ -571,9 +564,10 @@ sock.sendMessage(jid, {
|
|
|
571
564
|
})
|
|
572
565
|
```
|
|
573
566
|
|
|
574
|
-
##### 3ď¸âŁ Interactive
|
|
567
|
+
##### 3ď¸âŁ Interactive
|
|
575
568
|
|
|
576
569
|
```javascript
|
|
570
|
+
// --- Native Flow
|
|
577
571
|
sock.sendMessage(jid, {
|
|
578
572
|
image: {
|
|
579
573
|
url: './path/to/image.jpg'
|
|
@@ -597,38 +591,32 @@ sock.sendMessage(jid, {
|
|
|
597
591
|
text: 'đ Source',
|
|
598
592
|
url: 'https://www.npmjs.com/package/baileys'
|
|
599
593
|
}, {
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
title: '
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
description: '',
|
|
618
|
-
id: '#SecretIngredient'
|
|
619
|
-
}]
|
|
594
|
+
text: 'đ Select',
|
|
595
|
+
sections: [{
|
|
596
|
+
title: '⨠Section 1',
|
|
597
|
+
rows: [{
|
|
598
|
+
header: '',
|
|
599
|
+
title: 'đˇď¸ Coupon',
|
|
600
|
+
description: '',
|
|
601
|
+
id: '#CouponCode'
|
|
602
|
+
}]
|
|
603
|
+
}, {
|
|
604
|
+
title: '⨠Section 2',
|
|
605
|
+
highlight_label: 'đĽ Popular',
|
|
606
|
+
rows: [{
|
|
607
|
+
header: '',
|
|
608
|
+
title: 'đ Secret Ingredient',
|
|
609
|
+
description: '',
|
|
610
|
+
id: '#SecretIngredient'
|
|
620
611
|
}]
|
|
621
|
-
}
|
|
612
|
+
}]
|
|
622
613
|
}],
|
|
623
614
|
interactiveAsTemplate: false, // --- Optional, wrap the interactive message into a template
|
|
624
615
|
}, {
|
|
625
616
|
quoted: message
|
|
626
617
|
})
|
|
627
|
-
```
|
|
628
|
-
|
|
629
|
-
##### đ Interactive (Carousel & Native Flow)
|
|
630
618
|
|
|
631
|
-
|
|
619
|
+
// --- Carousel & Native Flow
|
|
632
620
|
sock.sendMessage(jid, {
|
|
633
621
|
text: 'đď¸ Interactive with Carousel!',
|
|
634
622
|
footer: '@itsliaaa/baileys',
|
|
@@ -677,7 +665,7 @@ sock.sendMessage(jid, {
|
|
|
677
665
|
})
|
|
678
666
|
```
|
|
679
667
|
|
|
680
|
-
##### 4ď¸âŁ
|
|
668
|
+
##### 4ď¸âŁ Hydrated Template
|
|
681
669
|
|
|
682
670
|
```javascript
|
|
683
671
|
sock.sendMessage(jid, {
|