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