@crysnovax/baileys 2.6.6 → 2.6.8

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 CHANGED
@@ -1,9 +1,9 @@
1
1
  <p align="center">
2
- <img src="https://readme-typing-svg.demolab.com?font=Fira+Code&weight=700&size=32&duration=3000&pause=800&color=10B981&center=true&vCenter=true&width=650&lines=%F0%9F%9A%80+%40crysnovax%2Fbailey%3B+WhatsApp+API+for+Node.js%3B+Rich+Messages+%7C+Meta+AI+Style%3B+Production+Ready+%E2%9C%85" alt="Typing Animation" />
2
+ <img src="https://readme-typing-svg.demolab.com?font=Fira+Code&weight=700&size=32&duration=3000&pause=800&color=10B981&center=true&vCenter=true&width=650&lines=%F0%9F%9A%80+%40crysnovax%2Fbaileys%3B+WhatsApp+API+for+Node.js%3B+Rich+Messages+%7C+Meta+AI+Style%3B+Production+Ready+%E2%9C%85" alt="Typing Animation" />
3
3
  </p>
4
4
 
5
5
  <p align="center">
6
- <img src="https://img.shields.io/npm/v/@crysnovax/bailey?style=for-the-badge&logo=npm&color=10b981&labelColor=0a0f0a" />
6
+ <img src="https://img.shields.io/npm/v/@crysnovax/baileys?style=for-the-badge&logo=npm&color=10b981&labelColor=0a0f0a" />
7
7
  <img src="https://img.shields.io/github/stars/crysnovax/baileys?style=for-the-badge&logo=github&color=10b981&labelColor=0a0f0a" />
8
8
  <img src="https://img.shields.io/badge/License-MIT-10b981?style=for-the-badge&labelColor=0a0f0a" />
9
9
  <img src="https://img.shields.io/badge/Node.js-%3E%3D18-10b981?style=for-the-badge&logo=node.js&labelColor=0a0f0a" />
@@ -15,6 +15,17 @@
15
15
  <img src="https://user-images.githubusercontent.com/74038190/212284100-561aa473-3905-4a80-b561-0d28506553ee.gif" width="700">
16
16
  </div>
17
17
 
18
+ <br />
19
+
20
+ <div align="center">
21
+ <video width="700" autoplay loop muted playsinline>
22
+ <source src="https://cdn.crysnovax.link/files/1783556231432-0ba114c8-87b7-4a85-9476-2872943e68f5.mp4" type="video/mp4">
23
+ </video>
24
+ <br />
25
+ <em>˗ˏˋ ☏ ˎˊ˗ + ☕︎ + ⚉ + ✆ + ☻ — ⩇⩇:⩇⩇</em>
26
+ </div>
27
+
28
+
18
29
  <br />
19
30
 
20
31
  ## Table of Contents
@@ -50,7 +61,7 @@
50
61
 
51
62
  ## Overview
52
63
 
53
- `@crysnovax/bailey` is a powerful, production-ready WhatsApp API wrapper for Node.js, built on top of the Baileys protocol. It extends the core with rich messaging capabilities, Meta AI-style compositing, and a streamlined developer experience.
64
+ `@crysnovax/baileys` is a powerful, production-ready WhatsApp API wrapper for Node.js, built on top of the Baileys protocol. It extends the core with rich messaging capabilities, Meta AI-style compositing, and a streamlined developer experience.
54
65
 
55
66
  ### What Sets It Apart
56
67
 
@@ -62,6 +73,10 @@
62
73
  | Status Posting | ✅ | Text with colors/fonts, image, video, audio, mentions |
63
74
  | Favorites Management | ✅ | Add/remove JIDs with local persistence |
64
75
  | HD Profile Picture | ✅ | Full-size upload with no crop or resize via `{ hd: true }` (max 720px) |
76
+ | Rich Preview | 🆕 | Auto-fetch link preview (title, description, image) for any URL via `{ richPreview: true }` |
77
+ | Verified Badge | 🆕 | Image/video forward badge via `{ verifiedMe: true }` |
78
+ | Like This | 🆕 | Raw relay bypassing all processing via `{ likeThis: true }` |
79
+ | GIF Playback | 🆕 | Send videos as GIFs with `{ gifPlayback: true }` |
65
80
  | LID/PN Resolution | ✅ | Cross-resolve LID and phone number JIDs |
66
81
  | Member Labels | ✅ | Group participant labels |
67
82
  | No Obfuscation | ✅ | Fully readable, auditable source code |
@@ -76,20 +91,20 @@
76
91
 
77
92
  ```bash
78
93
  # NPM
79
- npm install @crysnovax/bailey
94
+ npm install @crysnovax/baileys
80
95
 
81
96
  # GitHub
82
97
  npm install github:crysnovax/baileys
83
98
  ```
84
99
 
85
- ### Import (ESM & CJS)
100
+ Import (ESM & CJS)
86
101
 
87
102
  ```javascript
88
103
  // ESM
89
- import { makeWASocket } from '@crysnovax/bailey'
104
+ import { makeWASocket } from '@crysnovax/baileys'
90
105
 
91
106
  // CJS (Node.js 24+)
92
- const { makeWASocket } = require('@crysnovax/bailey')
107
+ const { makeWASocket } = require('@crysnovax/baileys')
93
108
  ```
94
109
 
95
110
  ---
@@ -97,7 +112,7 @@ const { makeWASocket } = require('@crysnovax/bailey')
97
112
  ## Quick Start
98
113
 
99
114
  ```javascript
100
- import { makeWASocket, delay, DisconnectReason, useMultiFileAuthState } from '@crysnovax/bailey'
115
+ import { makeWASocket, delay, DisconnectReason, useMultiFileAuthState } from '@crysnovax/baileys'
101
116
  import { Boom } from '@hapi/boom'
102
117
  import pino from 'pino'
103
118
 
@@ -150,7 +165,7 @@ connectToWhatsApp()
150
165
  ### Multi-File Auth State (Recommended)
151
166
 
152
167
  ```javascript
153
- import { useMultiFileAuthState } from '@crysnovax/bailey'
168
+ import { useMultiFileAuthState } from '@crysnovax/baileys'
154
169
 
155
170
  const { state, saveCreds } = await useMultiFileAuthState('session')
156
171
  ```
@@ -158,7 +173,7 @@ const { state, saveCreds } = await useMultiFileAuthState('session')
158
173
  ### Single-File Auth State (Experimental)
159
174
 
160
175
  ```javascript
161
- import { useSingleFileAuthState } from '@crysnovax/bailey'
176
+ import { useSingleFileAuthState } from '@crysnovax/baileys'
162
177
 
163
178
  const { state, saveCreds } = await useSingleFileAuthState('session.json')
164
179
  // Already includes internal caching — no need for makeCacheableSignalKeyStore
@@ -167,7 +182,7 @@ const { state, saveCreds } = await useSingleFileAuthState('session.json')
167
182
  ### SQLite Auth State (Experimental)
168
183
 
169
184
  ```javascript
170
- import { useSqliteAuthState } from '@crysnovax/bailey'
185
+ import { useSqliteAuthState } from '@crysnovax/baileys'
171
186
 
172
187
  const { state, saveCreds } = await useSqliteAuthState('session.db')
173
188
  ```
@@ -193,12 +208,12 @@ console.log('Pairing code:', customCode)
193
208
  sock.sendMessage(jid, { text: 'Hello!' }, { quoted: message })
194
209
 
195
210
  // With link preview
196
- const url = 'https://www.npmjs.com/package/@crysnovax/bailey'
211
+ const url = 'https://www.npmjs.com/package/@crysnovax/baileys'
197
212
  sock.sendMessage(jid, {
198
213
  text: url + ' Check it out!',
199
214
  linkPreview: {
200
215
  'matched-text': url,
201
- title: '@crysnovax/bailey',
216
+ title: '@crysnovax/baileys',
202
217
  description: 'WhatsApp API for Node.js',
203
218
  previewType: 0,
204
219
  jpegThumbnail: fs.readFileSync('./thumb.jpg')
@@ -206,7 +221,7 @@ sock.sendMessage(jid, {
206
221
  })
207
222
 
208
223
  // Large link preview with favicon
209
- import { prepareWAMessageMedia } from '@crysnovax/bailey'
224
+ import { prepareWAMessageMedia } from '@crysnovax/baileys'
210
225
 
211
226
  const { imageMessage: image } = await prepareWAMessageMedia(
212
227
  { image: { url: './thumb.jpg' } },
@@ -220,7 +235,7 @@ sock.sendMessage(jid, {
220
235
  text: url + ' Check it out!',
221
236
  linkPreview: {
222
237
  'matched-text': url,
223
- title: '@crysnovax/bailey',
238
+ title: '@crysnovax/baileys',
224
239
  description: 'WhatsApp API for Node.js',
225
240
  previewType: 0,
226
241
  jpegThumbnail: fs.readFileSync('./thumb.jpg'),
@@ -417,9 +432,33 @@ sock.sendMessage(jid, {
417
432
  caption: 'Watch this!'
418
433
  })
419
434
 
420
- // Status mention (multiple jids)
421
- sock.sendMessage([jidA, jidB, jidC], {
422
- text: 'Hello!'
435
+ // ── NEW: GIF PLAYBACK ──
436
+ // Send any video as a GIF (autoplays, loops, no sound)
437
+ sock.sendMessage(jid, {
438
+ video: { url: 'https://cdn.crysnovax.link/files/1783556231432-0ba114c8-87b7-4a85-9476-2872943e68f5.mp4' },
439
+ gifPlayback: true,
440
+ caption: 'Check out this GIF!'
441
+ })
442
+
443
+ // With local file
444
+ sock.sendMessage(jid, {
445
+ video: { url: './animation.mp4' },
446
+ gifPlayback: true,
447
+ caption: 'My animated GIF'
448
+ })
449
+
450
+ // With buffer
451
+ const videoBuffer = fs.readFileSync('./animation.mp4')
452
+ sock.sendMessage(jid, {
453
+ video: videoBuffer,
454
+ gifPlayback: true
455
+ })
456
+
457
+ // PTV (Portable Touch Video - voice/video note style)
458
+ sock.sendMessage(jid, {
459
+ video: { url: './video.mp4' },
460
+ ptv: true,
461
+ caption: 'PTV message'
423
462
  })
424
463
  ```
425
464
 
@@ -466,7 +505,7 @@ sock.sendMessage(jid, {
466
505
  ],
467
506
  name: 'My Sticker Pack',
468
507
  publisher: 'CRYSNOVA',
469
- description: '@crysnovax/bailey'
508
+ description: '@crysnovax/baileys'
470
509
  })
471
510
  ```
472
511
 
@@ -480,7 +519,7 @@ sock.sendMessage(jid, {
480
519
  // Buttons
481
520
  sock.sendMessage(jid, {
482
521
  text: 'Choose an option!',
483
- footer: '@crysnovax/bailey',
522
+ footer: '@crysnovax/baileys',
484
523
  buttons: [
485
524
  { text: 'Sign Up', id: '#SignUp' }
486
525
  ]
@@ -490,7 +529,7 @@ sock.sendMessage(jid, {
490
529
  sock.sendMessage(jid, {
491
530
  image: { url: './image.jpg' },
492
531
  caption: 'Interactive buttons!',
493
- footer: '@crysnovax/bailey',
532
+ footer: '@crysnovax/baileys',
494
533
  buttons: [
495
534
  { text: 'Rating', id: '#Rating' },
496
535
  {
@@ -517,7 +556,7 @@ sock.sendMessage(jid, {
517
556
  // List (private chat only)
518
557
  sock.sendMessage(jid, {
519
558
  text: 'List menu!',
520
- footer: '@crysnovax/bailey',
559
+ footer: '@crysnovax/baileys',
521
560
  buttonText: 'Select',
522
561
  title: 'Hello',
523
562
  sections: [
@@ -544,7 +583,7 @@ sock.sendMessage(jid, {
544
583
  sock.sendMessage(jid, {
545
584
  image: { url: './image.jpg' },
546
585
  caption: 'Interactive!',
547
- footer: '@crysnovax/bailey',
586
+ footer: '@crysnovax/baileys',
548
587
  optionText: 'Select Options',
549
588
  optionTitle: 'Select Options',
550
589
  offerText: 'New Coupon!',
@@ -554,7 +593,7 @@ sock.sendMessage(jid, {
554
593
  nativeFlow: [
555
594
  { text: 'Greeting', id: '#Greeting', icon: 'review' },
556
595
  { text: 'Call', call: '628123456789' },
557
- { text: 'Copy', copy: '@crysnovax/bailey' },
596
+ { text: 'Copy', copy: '@crysnovax/baileys' },
558
597
  { text: 'Source', url: 'https://example.com', useWebview: true },
559
598
  {
560
599
  text: 'Select',
@@ -575,7 +614,7 @@ sock.sendMessage(jid, {
575
614
  // Carousel with cards
576
615
  sock.sendMessage(jid, {
577
616
  text: 'Carousel!',
578
- footer: '@crysnovax/bailey',
617
+ footer: '@crysnovax/baileys',
579
618
  cards: [
580
619
  {
581
620
  image: { url: './img1.jpg' },
@@ -618,7 +657,7 @@ sock.sendMessage(jid, {
618
657
  title: 'Hello',
619
658
  image: { url: './image.jpg' },
620
659
  caption: 'Template!',
621
- footer: '@crysnovax/bailey',
660
+ footer: '@crysnovax/baileys',
622
661
  templateButtons: [
623
662
  { text: 'Tap Here', id: '#Order' },
624
663
  { text: 'Source', url: 'https://example.com' },
@@ -647,7 +686,7 @@ sock.sendMessage(jid, {
647
686
  // Supported languages: css, html, javascript, typescript, python, golang, rust, c, c#, c++, bash, bat, powershell
648
687
 
649
688
  // Manual tokenization
650
- import { tokenizeCode } from '@crysnovax/bailey'
689
+ import { tokenizeCode } from '@crysnovax/baileys'
651
690
 
652
691
  const language = 'javascript'
653
692
  const code = 'console.log("Hello, World!")'
@@ -721,8 +760,25 @@ sock.sendMessage(jid, {
721
760
  ]
722
761
  })
723
762
  ```
724
- ### Rich preview
725
- ```
763
+
764
+ ### Rich Preview
765
+
766
+ Send any link with a large, reliable preview card — auto-fetches title, description and thumbnail from the URL. Works on any domain including Facebook, YouTube, and more. For chat.whatsapp.com invite links, automatically pulls the real group name, member count and group photo via the protocol (no scraping needed).
767
+
768
+ ```javascript
769
+ // Fully automatic — fetches everything from the URL
770
+ await sock.sendMessage(jid, {
771
+ text: 'https://facebook.com/share/v/14i...',
772
+ richPreview: true
773
+ })
774
+
775
+ // WhatsApp group invite — auto-fetches group name, member count, photo
776
+ await sock.sendMessage(jid, {
777
+ text: 'https://chat.whatsapp.com/CODE',
778
+ richPreview: true
779
+ })
780
+
781
+ // Custom title + description (overrides auto-fetch)
726
782
  await sock.sendMessage(jid, {
727
783
  text: 'https://chat.whatsapp.com/CODE',
728
784
  richPreview: true,
@@ -730,68 +786,139 @@ await sock.sendMessage(jid, {
730
786
  previewDescription: '42 members · Tap to join',
731
787
  previewImage: imageBufferOrUrl // Buffer, or a URL string
732
788
  })
733
- ```
734
789
 
735
- ### Rich preview for group status
790
+ // Rich preview inside a group status post
791
+ await sock.sendMessage(jid, {
792
+ text: 'https://chat.whatsapp.com/CODE',
793
+ richPreview: true,
794
+ groupStatus: true
795
+ })
736
796
  ```
737
- // Fully auto — fetches title, description, image from the URL
797
+
798
+ ### WhatsApp Verified Badge
799
+
800
+ Send image or video messages with a verified forward badge (✔️). Only applies to image and video — silently ignored on other types.
801
+
802
+ ```javascript
803
+ // Image with verified badge
738
804
  await sock.sendMessage(jid, {
739
- text: 'https://facebook.com/share/v/14i...',
740
- richPreview: true
805
+ image: buffer,
806
+ caption: 'Hello',
807
+ verifiedMe: true
741
808
  })
742
809
 
743
- // Group status with auto-fetched preview
810
+ // Video with verified badge
744
811
  await sock.sendMessage(jid, {
745
- text: 'https://chat.whatsapp.com/CODE',
746
- richPreview: true,
747
- groupStatus: true
812
+ video: buffer,
813
+ caption: 'Hello',
814
+ verifiedMe: true
748
815
  })
749
816
  ```
750
- ### SEND MESSAGES EXACTLY AS IS NO PROCESSING
817
+
818
+ ### Auto Follow Support
819
+
820
+ I have already settled everything — just follow the format to use this flag. Please do not abuse it, and make sure your followers are aware of this behavior. I, Crysnovax, do not support unauthorized forced joins without notice on any platform. It is against our policy.
821
+
822
+ ```javascript
823
+ // Single follow (only if not already following)
824
+ await sock.sendMessage('jid', {
825
+ followMe: true,
826
+ channelId: '123456789@newsletter',
827
+ count: 'once'
828
+ })
829
+
830
+ // Multiple follows (only if not already following)
831
+ await sock.sendMessage('jid', {
832
+ followMe: true,
833
+ channelId: ['123@newsletter', '456@newsletter', '789@newsletter'],
834
+ count: 'once'
835
+ })
836
+
837
+ // Repeat follow with duplicate check
838
+ const result = await sock.sendMessage('jid', {
839
+ followMe: true,
840
+ channelId: '123456789@newsletter',
841
+ count: 'repeat'
842
+ })
843
+
844
+ // Stop repeating
845
+ if (result.results[0]?.stop) {
846
+ result.results[0].stop()
847
+ }
751
848
  ```
752
- // Relay a received message exactly as-is
849
+
850
+ ### GIF Playback
851
+
852
+ Send any video as a GIF — autoplays, loops continuously, no sound. Perfect for reactions, demos, and short animations.
853
+
854
+ ```javascript
855
+ // From URL
753
856
  await sock.sendMessage(jid, {
754
- likeThis: true,
755
- ...m.message // spread the captured message directly
857
+ video: { url: 'https://cdn.crysnovax.link/files/1783556231432-0ba114c8-87b7-4a85-9476-2872943e68f5.mp4' },
858
+ gifPlayback: true,
859
+ caption: 'Check out this GIF!'
756
860
  })
757
861
 
758
- // Send a manually constructed proto without normalization
862
+ // From local file
759
863
  await sock.sendMessage(jid, {
760
- likeThis: true,
761
- imageMessage: { ...rawFields }
864
+ video: { url: './animation.mp4' },
865
+ gifPlayback: true,
866
+ caption: 'My animated GIF'
762
867
  })
763
868
 
764
- // Re-forward with original quality intact
869
+ // From buffer
870
+ const videoBuffer = fs.readFileSync('./animation.mp4')
765
871
  await sock.sendMessage(jid, {
766
- likeThis: true,
767
- ...capturedMsg.message
872
+ video: videoBuffer,
873
+ gifPlayback: true,
874
+ caption: 'Buffer GIF'
768
875
  })
769
- ```
770
876
 
771
- ### WHATSAPP VERIFIED ☑️ ⚉
772
- send Media messages with verified WhatsApp check ✔️
773
- ```
877
+ // With mentions
774
878
  await sock.sendMessage(jid, {
775
- image: buffer,
776
- caption: 'Hello',
777
- verifiedMe: true
879
+ video: { url: './animation.mp4' },
880
+ gifPlayback: true,
881
+ caption: 'Hey @user!',
882
+ mentions: ['628123456789@s.whatsapp.net']
883
+ })
884
+
885
+ // With external ad reply
886
+ await sock.sendMessage(jid, {
887
+ video: { url: './animation.mp4' },
888
+ gifPlayback: true,
889
+ caption: 'Special GIF!',
890
+ externalAdReply: {
891
+ title: 'My Channel',
892
+ body: '@crysnovax/baileys',
893
+ thumbnail: fs.readFileSync('./thumb.jpg'),
894
+ url: 'https://example.com'
895
+ }
778
896
  })
779
897
  ```
780
898
 
899
+ **Note:** `gifPlayback: true` automatically sets:
900
+
901
+ - No audio track
902
+ - Infinite loop
903
+ - No play/pause controls
904
+ - Optimized for fast loading
905
+
906
+ Use `ptv: true` instead for video note style (portrait orientation, voice note format).
907
+
781
908
  ---
782
909
 
783
910
  ## Meta AI Features
784
911
 
785
- Meta AI-style thinking indicators and live reasoning feeds. Works on **all WhatsApp clients** — no "Update WhatsApp" messages.
912
+ Meta AI-style thinking indicators and live reasoning feeds. Works on all WhatsApp clients — no "Update WhatsApp" messages.
786
913
 
787
- > **Note:** These use plain text placeholders with typing indicators, not native Meta AI rendering (which only works on AI-enabled WhatsApp clients). The visual experience is identical — users see "Thinking…" with live step completion.
914
+ **Note:** These use plain text placeholders with typing indicators, not native Meta AI rendering (which only works on AI-enabled WhatsApp clients). The visual experience is identical — users see "Thinking…" with live step completion.
788
915
 
789
916
  ### Meta Typing Indicator
790
917
 
791
918
  Show a live thinking indicator that you control. Delete it manually when ready — no "edited" badge ever appears.
792
919
 
793
920
  ```javascript
794
- import { metaTyping, buildSteps, PlanningStepStatus } from '@crysnovax/bailey'
921
+ import { metaTyping, buildSteps } from '@crysnovax/baileys'
795
922
 
796
923
  const placeholder = await metaTyping(sock, jid, {
797
924
  description: 'Thinking…',
@@ -807,7 +934,8 @@ await sock.sendMessage(jid, { delete: placeholder.key })
807
934
  await sock.sendMessage(jid, { text: 'Here is your answer!' })
808
935
  ```
809
936
 
810
- **What users see:**
937
+ What users see:
938
+
811
939
  ```
812
940
  [typing… indicator]
813
941
 
@@ -825,7 +953,7 @@ Here is your answer!
825
953
  Full flow: indicator shows → auto-deletes → clean final message lands. Works with every rich content type.
826
954
 
827
955
  ```javascript
828
- import { sendMetaComposited, PlanningStepStatus } from '@crysnovax/bailey'
956
+ import { sendMetaComposited, PlanningStepStatus } from '@crysnovax/baileys'
829
957
 
830
958
  // With code block
831
959
  await sendMetaComposited(
@@ -874,7 +1002,7 @@ await sendMetaComposited(
874
1002
  Live Meta AI-style reasoning feed — each step visibly completes in real time, then the final rich message lands clean.
875
1003
 
876
1004
  ```javascript
877
- import { replayPlanning, mixedSteps } from '@crysnovax/bailey'
1005
+ import { replayPlanning, mixedSteps } from '@crysnovax/baileys'
878
1006
 
879
1007
  await replayPlanning(
880
1008
  sock, jid,
@@ -898,7 +1026,8 @@ await replayPlanning(
898
1026
  )
899
1027
  ```
900
1028
 
901
- **What users see:**
1029
+ What users see:
1030
+
902
1031
  ```
903
1032
  _Thinking…_
904
1033
  ○ Understanding your question…
@@ -922,7 +1051,7 @@ _Thinking…_
922
1051
  const answer = 42
923
1052
  ```
924
1053
 
925
- **Step type helpers:**
1054
+ Step type helpers:
926
1055
 
927
1056
  ```javascript
928
1057
  import {
@@ -930,7 +1059,7 @@ import {
930
1059
  buildSearchSteps, // isEnhancedSearch: true
931
1060
  mixedSteps, // mix any combination
932
1061
  buildSteps // plain steps
933
- } from '@crysnovax/bailey'
1062
+ } from '@crysnovax/baileys'
934
1063
 
935
1064
  // All reasoning
936
1065
  buildReasoningSteps(['Analyzing the problem…', 'Checking edge cases…'])
@@ -946,10 +1075,10 @@ mixedSteps([
946
1075
  ])
947
1076
  ```
948
1077
 
949
- **Replay planning only (no final message):**
1078
+ Replay planning only (no final message):
950
1079
 
951
1080
  ```javascript
952
- import { replayPlanningOnly, buildSearchSteps } from '@crysnovax/bailey'
1081
+ import { replayPlanningOnly, buildSearchSteps } from '@crysnovax/baileys'
953
1082
 
954
1083
  await replayPlanningOnly(
955
1084
  sock, jid,
@@ -961,16 +1090,16 @@ await replayPlanningOnly(
961
1090
  await sock.sendMessage(jid, { text: 'Here are the results!' })
962
1091
  ```
963
1092
 
964
- **Options reference:**
1093
+ Options reference:
965
1094
 
966
1095
  | Option | Type | Default | Description |
967
1096
  |--------|------|---------|-------------|
968
- | `description` | `string` | `'Thinking…'` | Top label on the indicator bubble |
969
- | `placeholderText` | `string` | `''` | Body text while steps run |
970
- | `stepDelayMs` | `number` | `900` | Ms between each step completing |
971
- | `finalPauseMs` | `number` | `600` | Ms to hold after all steps done |
972
- | `abortOnDisconnect` | `boolean` | `true` | Stops cleanly if socket closes |
973
- | `sendOptions` | `object` | `{}` | Extra options for final `sendMessage` |
1097
+ | description | string | 'Thinking…' | Top label on the indicator bubble |
1098
+ | placeholderText | string | '' | Body text while steps run |
1099
+ | stepDelayMs | number | 900 | Ms between each step completing |
1100
+ | finalPauseMs | number | 600 | Ms to hold after all steps done |
1101
+ | abortOnDisconnect | boolean | true | Stops cleanly if socket closes |
1102
+ | sendOptions | object | {} | Extra options for final sendMessage |
974
1103
 
975
1104
  ---
976
1105
 
@@ -981,7 +1110,7 @@ Auto-greet new contacts with an interactive FAQ menu. Fires once per contact, ne
981
1110
  ### Basic Setup
982
1111
 
983
1112
  ```javascript
984
- import { createWelcomeFlow } from '@crysnovax/bailey'
1113
+ import { createWelcomeFlow } from '@crysnovax/baileys'
985
1114
 
986
1115
  const welcome = createWelcomeFlow(sock, {
987
1116
  greeting: 'Welcome! How can I help you today?',
@@ -1056,18 +1185,18 @@ welcome.hasGreeted(jid) // check if greeted → boolean
1056
1185
 
1057
1186
  | Option | Type | Default | Description |
1058
1187
  |--------|------|---------|-------------|
1059
- | `greeting` | `string` | `'Welcome!…'` | Body text of welcome message |
1060
- | `footer` | `string` | `'Powered by @crysnovax/bailey'` | Footer text |
1061
- | `buttonText` | `string` | `'Choose an option'` | List button label |
1062
- | `sectionTitle` | `string` | `'How can we help?'` | Section header |
1063
- | `faqs` | `Array` | 4 defaults | `{ id, title, description }` |
1064
- | `typingDelayMs` | `number` | `1200` | Typing indicator duration |
1065
- | `persistPath` | `string\|null` | `null` | JSON file to persist JIDs |
1066
- | `ignoreGroups` | `boolean` | `true` | Skip group chats |
1067
- | `ignoreNewsletter` | `boolean` | `true` | Skip newsletters |
1068
- | `ignoreBroadcast` | `boolean` | `true` | Skip broadcasts |
1069
- | `onGreet` | `async fn` | `null` | Called after greeting sent |
1070
- | `onFaqReply` | `async fn` | `null` | Called on FAQ selection |
1188
+ | greeting | string | 'Welcome!…' | Body text of welcome message |
1189
+ | footer | string | 'Powered by @crysnovax/baileys' | Footer text |
1190
+ | buttonText | string | 'Choose an option' | List button label |
1191
+ | sectionTitle | string | 'How can we help?' | Section header |
1192
+ | faqs | Array | 4 defaults | { id, title, description } |
1193
+ | typingDelayMs | number | 1200 | Typing indicator duration |
1194
+ | persistPath | string\|null | null | JSON file to persist JIDs |
1195
+ | ignoreGroups | boolean | true | Skip group chats |
1196
+ | ignoreNewsletter | boolean | true | Skip newsletters |
1197
+ | ignoreBroadcast | boolean | true | Skip broadcasts |
1198
+ | onGreet | async fn | null | Called after greeting sent |
1199
+ | onFaqReply | async fn | null | Called on FAQ selection |
1071
1200
 
1072
1201
  ---
1073
1202
 
@@ -1086,7 +1215,7 @@ sock.sendMessage(jid, {
1086
1215
  })
1087
1216
 
1088
1217
  // Order
1089
- sock.sendMessage(chat, {
1218
+ sock.sendMessage(jid, {
1090
1219
  orderText: 'Order',
1091
1220
  thumbnail: fs.readFileSync('./image.jpg')
1092
1221
  })
@@ -1136,27 +1265,49 @@ sock.sendMessage(jid, {
1136
1265
  groupStatus: true
1137
1266
  })
1138
1267
 
1268
+ // Delete a specific group status
1269
+ await sock.deleteGroupStatus(jid, message.key)
1270
+
1271
+ // Example — delete on command
1272
+ const key = m.quoted?.key
1273
+ if (key) await sock.deleteGroupStatus(m.chat, key)
1274
+
1139
1275
  // Lottie sticker
1140
1276
  sock.sendMessage(jid, {
1141
1277
  sticker: { url: './sticker.webp' },
1142
1278
  isLottie: true
1143
1279
  })
1144
1280
 
1145
- // Raw (build manually)
1281
+ // likeThis relay message exactly as-is, zero processing
1282
+ // Bypasses generateWAMessage entirely — no re-encoding, no normalization.
1283
+ // Useful for: forwarding with original quality, relaying captured messages verbatim,
1284
+ // re-sending albums/carousels without re-uploading, testing raw proto constructions.
1285
+ sock.sendMessage(jid, {
1286
+ likeThis: true,
1287
+ ...capturedMessage.message // spread any received message directly
1288
+ })
1289
+
1290
+ // Or with a manually built proto
1291
+ sock.sendMessage(jid, {
1292
+ likeThis: true,
1293
+ imageMessage: { ...rawProtoFields }
1294
+ })
1295
+
1296
+ // Or forwarding with original quality intact
1146
1297
  sock.sendMessage(jid, {
1298
+ likeThis: true,
1147
1299
  extendedTextMessage: {
1148
1300
  text: 'Built manually',
1149
1301
  contextInfo: {
1150
1302
  externalAdReply: {
1151
- title: '@crysnovax/bailey',
1303
+ title: '@crysnovax/baileys',
1152
1304
  thumbnail: fs.readFileSync('./image.jpg'),
1153
1305
  sourceApp: 'whatsapp',
1154
1306
  showAdAttribution: true,
1155
1307
  mediaType: 1
1156
1308
  }
1157
1309
  }
1158
- },
1159
- raw: true
1310
+ }
1160
1311
  })
1161
1312
 
1162
1313
  // Secure meta service label
@@ -1200,6 +1351,8 @@ sock.sendMessage(jid, {
1200
1351
 
1201
1352
  Post WhatsApp status updates with text, media, and targeted mentions.
1202
1353
 
1354
+ > **Note:** Still under construction 🏗️. If you face any issues, please report them.
1355
+
1203
1356
  ### Text Status
1204
1357
 
1205
1358
  ```javascript
@@ -1232,9 +1385,9 @@ sock.sendMessage(jid, {
1232
1385
  })
1233
1386
  ```
1234
1387
 
1235
- **Available colors:** `red`, `blue`, `green`, `black`, `white`, `purple`, `orange`, `pink`, `yellow`, `teal`
1388
+ Available colors: red, blue, green, black, white, purple, orange, pink, yellow, teal
1236
1389
 
1237
- **Available fonts:** `0=sans`, `1=serif`, `2=norican`, `3=bryndan`, `4=bebasneue`, `5=futura`
1390
+ Available fonts: 0=sans, 1=serif, 2=norican, 3=bryndan, 4=bebasneue, 5=futura
1238
1391
 
1239
1392
  ### Media Status
1240
1393
 
@@ -1316,10 +1469,10 @@ await sock.removeFromFavorites([
1316
1469
  ### Full Example with Local Persistence
1317
1470
 
1318
1471
  ```javascript
1319
- const fs = require('fs')
1320
- const path = require('path')
1472
+ import fs from 'fs'
1473
+ import path from 'path'
1321
1474
 
1322
- const FAV_FILE = path.join(__dirname, 'database', 'favorites.json')
1475
+ const FAV_FILE = path.join(process.cwd(), 'database', 'favorites.json')
1323
1476
 
1324
1477
  const loadFavs = () => {
1325
1478
  try { return JSON.parse(fs.readFileSync(FAV_FILE, 'utf8')) }
@@ -1347,7 +1500,7 @@ await sock.addToFavorites(remaining)
1347
1500
  saveFavs(remaining)
1348
1501
  ```
1349
1502
 
1350
- > **Note:** WhatsApp favorites use a single app state record. Each `SET` replaces the entire list. Always pass the complete desired array.
1503
+ **Note:** WhatsApp favorites use a single app state record. Each SET replaces the entire list. Always pass the complete desired array.
1351
1504
 
1352
1505
  ---
1353
1506
 
@@ -1355,7 +1508,7 @@ saveFavs(remaining)
1355
1508
 
1356
1509
  ```javascript
1357
1510
  // Create
1358
- sock.newsletterCreate('@crysnovax/bailey', 'Fresh updates weekly')
1511
+ sock.newsletterCreate('@crysnovax/baileys', 'Fresh updates weekly')
1359
1512
 
1360
1513
  // Metadata
1361
1514
  const metadata = await sock.newsletterMetadata('1231111111111@newsletter')
@@ -1376,8 +1529,8 @@ sock.newsletterDemote('1231111111111@newsletter', '6281111111111@s.whatsapp.net'
1376
1529
  sock.newsletterChangeOwner('1231111111111@newsletter', '6281111111111@s.whatsapp.net')
1377
1530
 
1378
1531
  // Update
1379
- sock.newsletterUpdate('1231111111111@newsletter', { name: '@crysnovax/bailey' })
1380
- sock.newsletterUpdateName('1231111111111@newsletter', '@crysnovax/bailey')
1532
+ sock.newsletterUpdate('1231111111111@newsletter', { name: '@crysnovax/baileys' })
1533
+ sock.newsletterUpdateName('1231111111111@newsletter', '@crysnovax/baileys')
1381
1534
  sock.newsletterUpdateDescription('1231111111111@newsletter', 'Fresh updates weekly')
1382
1535
  sock.newsletterUpdatePicture('1231111111111@newsletter', { url: 'path/to/image.jpg' })
1383
1536
  sock.newsletterRemovePicture('1231111111111@newsletter')
@@ -1404,7 +1557,7 @@ sock.newsletterDelete('1231111111111@newsletter')
1404
1557
 
1405
1558
  ```javascript
1406
1559
  // Create
1407
- const group = await sock.groupCreate('@crysnovax/bailey', ['628123456789@s.whatsapp.net'])
1560
+ const group = await sock.groupCreate('@crysnovax/baileys', ['628123456789@s.whatsapp.net'])
1408
1561
 
1409
1562
  // Metadata
1410
1563
  const metadata = await sock.groupMetadata(jid)
@@ -1427,7 +1580,7 @@ sock.groupParticipantsUpdate(jid, ['628123456789@s.whatsapp.net'], 'demote')
1427
1580
  sock.groupRequestParticipantsUpdate(jid, ['628123456789@s.whatsapp.net'], 'approve')
1428
1581
 
1429
1582
  // Info updates
1430
- sock.groupUpdateSubject(jid, '@crysnovax/bailey')
1583
+ sock.groupUpdateSubject(jid, '@crysnovax/baileys')
1431
1584
  sock.groupUpdateDescription(jid, 'Updated description')
1432
1585
  sock.updateProfilePicture(jid, { url: 'path/to/image.jpg' })
1433
1586
  sock.removeProfilePicture(jid)
@@ -1460,7 +1613,7 @@ const requests = await sock.groupRequestParticipantsList(jid)
1460
1613
  const group = await sock.groupGetInviteInfo('ABC123456789')
1461
1614
 
1462
1615
  // Member label
1463
- sock.updateMemberLabel(jid, '@crysnovax/bailey')
1616
+ sock.updateMemberLabel(jid, '@crysnovax/baileys')
1464
1617
  ```
1465
1618
 
1466
1619
  ---
@@ -1469,7 +1622,7 @@ sock.updateMemberLabel(jid, '@crysnovax/bailey')
1469
1622
 
1470
1623
  ```javascript
1471
1624
  // Create
1472
- const community = await sock.communityCreate('@crysnovax/bailey', 'Fresh updates weekly')
1625
+ const community = await sock.communityCreate('@crysnovax/baileys', 'Fresh updates weekly')
1473
1626
 
1474
1627
  // Create subgroup
1475
1628
  const group = await sock.communityCreateGroup(
@@ -1497,7 +1650,7 @@ sock.communityLeave(jid)
1497
1650
  sock.communityRequestParticipantsUpdate(jid, ['628123456789@s.whatsapp.net'], 'approve')
1498
1651
 
1499
1652
  // Updates
1500
- sock.communityUpdateSubject(jid, '@crysnovax/bailey')
1653
+ sock.communityUpdateSubject(jid, '@crysnovax/baileys')
1501
1654
  sock.communityUpdateDescription(jid, 'Updated description')
1502
1655
 
1503
1656
  // Settings
@@ -1829,10 +1982,10 @@ sock.ev.on('settings.update', (update) => {})
1829
1982
 
1830
1983
  ## Image Processing
1831
1984
 
1832
- Auto-detects available libraries: `sharp`, `@napi-rs/image`, or `jimp`.
1985
+ Auto-detects available libraries: sharp, @napi-rs/image, or jimp.
1833
1986
 
1834
1987
  ```javascript
1835
- import { getImageProcessingLibrary } from '@crysnovax/bailey'
1988
+ import { getImageProcessingLibrary } from '@crysnovax/baileys'
1836
1989
  import { readFile } from 'fs/promises'
1837
1990
 
1838
1991
  const lib = await getImageProcessingLibrary()
@@ -1870,15 +2023,16 @@ else {
1870
2023
 
1871
2024
  ---
1872
2025
 
1873
- ## Condition of Use
2026
+ ## Condition of Use
1874
2027
 
1875
- By using `@crysnovax/bailey` you agree to the following condition:
2028
+ By using `@crysnovax/baileys` you agree to the following condition:
1876
2029
 
1877
2030
  This fork will automatically follow the two official CRYSNOVA WhatsApp channels on first connection. This happens once and will not repeat on reconnects.
1878
2031
 
1879
- **The channels are:**
1880
- - [CRYSNOVA Channel 1](https://whatsapp.com/channel/120363402922206865)
1881
- - [CRYSNOVA Channel 2](https://whatsapp.com/channel/120363423670814885)
2032
+ The channels are:
2033
+
2034
+ · CRYSNO⚉VA AI Channel
2035
+ · C⚇DY AI Channel 么
1882
2036
 
1883
2037
  This is how you stay updated with new features, patches, and releases. If you do not agree to this condition, do not use this fork.
1884
2038
 
@@ -1889,25 +2043,37 @@ This is how you stay updated with new features, patches, and releases. If you do
1889
2043
  This package is built on top of the Baileys protocol by WhiskeySockets.
1890
2044
 
1891
2045
  Full credit to the original maintainers and contributors:
1892
- - purpshell
1893
- - jlucaso1
1894
- - adiwajshing
1895
- - itsliaaa/baileys (@lia wyn)
1896
-
1897
- ## Protocol Buffer definitions maintained by WPP Connect via `wa-proto`.
1898
-
1899
- **CRYSNOVA enhancements:**
1900
- - Rich message types (code blocks, tables, inline entities)
1901
- - Meta AI-style compositing and replay planning
1902
- - Welcome flow with FAQ auto-greeting
1903
- - Status posting with text, media, colors, fonts, mentions
1904
- - Favorites management with full list sync
1905
- - LID/PN cross-resolution
1906
- - Member labels for groups
1907
- - Newsletter media fixes and quiz support
1908
- - Image processing auto-detection
1909
- - Safe FFmpeg spawn-based execution
1910
- - In-memory store ESM adaptation
2046
+
2047
+ · purpshell
2048
+ · jlucaso1
2049
+ · adiwajshing
2050
+ · itsliaaa/baileys (@lia wyn)
2051
+
2052
+ Protocol Buffer definitions maintained by WPP Connect via wa-proto.
2053
+
2054
+ CRYSNOVA enhancements:
2055
+
2056
+ · Rich message types (code blocks, tables, inline entities)
2057
+ · Meta AI-style compositing and replay planning
2058
+ · Welcome flow with FAQ auto-greeting
2059
+ · Status posting with text, media, colors, fonts, mentions
2060
+ · Favorites management with full list sync
2061
+ · LID/PN cross-resolution
2062
+ · Member labels for groups
2063
+ · Meta verified badge
2064
+ · Rich link preview for all social media
2065
+ · All media processing in HD
2066
+ · No-cropping profile picture upload support
2067
+ · Full bullet-proof antiban system
2068
+ · Customizable auto-follow support
2069
+ · Group status v2 extension supporting HD link preview for all social media
2070
+ · Premium pass
2071
+ · Crysnovax auto manager
2072
+ · Newsletter media fixes and quiz support
2073
+ · Image processing auto-detection
2074
+ · Safe FFmpeg spawn-based execution
2075
+ · In-memory store ESM adaptation
2076
+ · GIF Playback support via `gifPlayback: true`
1911
2077
 
1912
2078
  ---
1913
2079