@rexxhayanasi/elaina-baileys 1.0.0

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 (196) hide show
  1. package/LICENSE +21 -0
  2. package/README.MD +459 -0
  3. package/WAProto/GenerateStatics.sh +4 -0
  4. package/WAProto/WAProto.proto +4775 -0
  5. package/WAProto/index.d.ts +55057 -0
  6. package/WAProto/index.js +169661 -0
  7. package/WAProto/index.ts.ts +53473 -0
  8. package/engine-requirements.js +10 -0
  9. package/lib/Defaults/baileys-version.json +3 -0
  10. package/lib/Defaults/index.d.ts +51 -0
  11. package/lib/Defaults/index.js +106 -0
  12. package/lib/Signal/Group/ciphertext-message.d.ts +9 -0
  13. package/lib/Signal/Group/ciphertext-message.js +15 -0
  14. package/lib/Signal/Group/group-session-builder.d.ts +14 -0
  15. package/lib/Signal/Group/group-session-builder.js +64 -0
  16. package/lib/Signal/Group/group_cipher.d.ts +17 -0
  17. package/lib/Signal/Group/group_cipher.js +96 -0
  18. package/lib/Signal/Group/index.d.ts +11 -0
  19. package/lib/Signal/Group/index.js +57 -0
  20. package/lib/Signal/Group/keyhelper.d.ts +10 -0
  21. package/lib/Signal/Group/keyhelper.js +55 -0
  22. package/lib/Signal/Group/queue-job.d.ts +1 -0
  23. package/lib/Signal/Group/queue-job.js +57 -0
  24. package/lib/Signal/Group/sender-chain-key.d.ts +13 -0
  25. package/lib/Signal/Group/sender-chain-key.js +34 -0
  26. package/lib/Signal/Group/sender-key-distribution-message.d.ts +16 -0
  27. package/lib/Signal/Group/sender-key-distribution-message.js +66 -0
  28. package/lib/Signal/Group/sender-key-message.d.ts +18 -0
  29. package/lib/Signal/Group/sender-key-message.js +69 -0
  30. package/lib/Signal/Group/sender-key-name.d.ts +17 -0
  31. package/lib/Signal/Group/sender-key-name.js +51 -0
  32. package/lib/Signal/Group/sender-key-record.d.ts +30 -0
  33. package/lib/Signal/Group/sender-key-record.js +53 -0
  34. package/lib/Signal/Group/sender-key-state.d.ts +38 -0
  35. package/lib/Signal/Group/sender-key-state.js +99 -0
  36. package/lib/Signal/Group/sender-message-key.d.ts +11 -0
  37. package/lib/Signal/Group/sender-message-key.js +29 -0
  38. package/lib/Signal/libsignal.d.ts +3 -0
  39. package/lib/Signal/libsignal.js +174 -0
  40. package/lib/Socket/Client/index.d.ts +2 -0
  41. package/lib/Socket/Client/index.js +18 -0
  42. package/lib/Socket/Client/types.d.ts +16 -0
  43. package/lib/Socket/Client/types.js +13 -0
  44. package/lib/Socket/Client/websocket.d.ts +13 -0
  45. package/lib/Socket/Client/websocket.js +111 -0
  46. package/lib/Socket/RHandler.d.ts +416 -0
  47. package/lib/Socket/RHandler.js +530 -0
  48. package/lib/Socket/business.d.ts +172 -0
  49. package/lib/Socket/business.js +260 -0
  50. package/lib/Socket/chats.d.ts +94 -0
  51. package/lib/Socket/chats.js +911 -0
  52. package/lib/Socket/groups.d.ts +124 -0
  53. package/lib/Socket/groups.js +332 -0
  54. package/lib/Socket/index.d.ts +172 -0
  55. package/lib/Socket/index.js +10 -0
  56. package/lib/Socket/messages-recv.d.ts +161 -0
  57. package/lib/Socket/messages-recv.js +1064 -0
  58. package/lib/Socket/messages-send.d.ts +152 -0
  59. package/lib/Socket/messages-send.js +903 -0
  60. package/lib/Socket/newsletter.d.ts +136 -0
  61. package/lib/Socket/newsletter.js +303 -0
  62. package/lib/Socket/socket.d.ts +43 -0
  63. package/lib/Socket/socket.js +672 -0
  64. package/lib/Socket/usync.d.ts +36 -0
  65. package/lib/Socket/usync.js +70 -0
  66. package/lib/Store/index.d.ts +2 -0
  67. package/lib/Store/index.js +8 -0
  68. package/lib/Store/make-in-memory-store.d.ts +118 -0
  69. package/lib/Store/make-in-memory-store.js +439 -0
  70. package/lib/Store/make-ordered-dictionary.d.ts +13 -0
  71. package/lib/Store/make-ordered-dictionary.js +81 -0
  72. package/lib/Store/object-repository.d.ts +10 -0
  73. package/lib/Store/object-repository.js +27 -0
  74. package/lib/Types/Auth.d.ts +103 -0
  75. package/lib/Types/Auth.js +2 -0
  76. package/lib/Types/Call.d.ts +13 -0
  77. package/lib/Types/Call.js +2 -0
  78. package/lib/Types/Chat.d.ts +109 -0
  79. package/lib/Types/Chat.js +4 -0
  80. package/lib/Types/Contact.d.ts +23 -0
  81. package/lib/Types/Contact.js +2 -0
  82. package/lib/Types/Events.d.ts +199 -0
  83. package/lib/Types/Events.js +2 -0
  84. package/lib/Types/GroupMetadata.d.ts +64 -0
  85. package/lib/Types/GroupMetadata.js +2 -0
  86. package/lib/Types/Label.d.ts +35 -0
  87. package/lib/Types/Label.js +27 -0
  88. package/lib/Types/LabelAssociation.d.ts +29 -0
  89. package/lib/Types/LabelAssociation.js +9 -0
  90. package/lib/Types/Message.d.ts +402 -0
  91. package/lib/Types/Message.js +7 -0
  92. package/lib/Types/Newsletter.d.ts +103 -0
  93. package/lib/Types/Newsletter.js +38 -0
  94. package/lib/Types/Product.d.ts +78 -0
  95. package/lib/Types/Product.js +2 -0
  96. package/lib/Types/Signal.d.ts +57 -0
  97. package/lib/Types/Signal.js +2 -0
  98. package/lib/Types/Socket.d.ts +119 -0
  99. package/lib/Types/Socket.js +2 -0
  100. package/lib/Types/State.d.ts +27 -0
  101. package/lib/Types/State.js +2 -0
  102. package/lib/Types/USync.d.ts +25 -0
  103. package/lib/Types/USync.js +2 -0
  104. package/lib/Types/index.d.ts +64 -0
  105. package/lib/Types/index.js +42 -0
  106. package/lib/Utils/audioToBuffer.js +29 -0
  107. package/lib/Utils/auth-utils.d.ts +18 -0
  108. package/lib/Utils/auth-utils.js +199 -0
  109. package/lib/Utils/baileys-event-stream.d.ts +16 -0
  110. package/lib/Utils/baileys-event-stream.js +63 -0
  111. package/lib/Utils/business.d.ts +22 -0
  112. package/lib/Utils/business.js +234 -0
  113. package/lib/Utils/chat-utils.d.ts +70 -0
  114. package/lib/Utils/chat-utils.js +730 -0
  115. package/lib/Utils/crypto.d.ts +40 -0
  116. package/lib/Utils/crypto.js +193 -0
  117. package/lib/Utils/decode-wa-message.d.ts +35 -0
  118. package/lib/Utils/decode-wa-message.js +207 -0
  119. package/lib/Utils/event-buffer.d.ts +35 -0
  120. package/lib/Utils/event-buffer.js +518 -0
  121. package/lib/Utils/generics.d.ts +89 -0
  122. package/lib/Utils/generics.js +428 -0
  123. package/lib/Utils/history.d.ts +19 -0
  124. package/lib/Utils/history.js +94 -0
  125. package/lib/Utils/index.d.ts +19 -0
  126. package/lib/Utils/index.js +36 -0
  127. package/lib/Utils/link-preview.d.ts +21 -0
  128. package/lib/Utils/link-preview.js +126 -0
  129. package/lib/Utils/logger.d.ts +11 -0
  130. package/lib/Utils/logger.js +7 -0
  131. package/lib/Utils/lt-hash.d.ts +12 -0
  132. package/lib/Utils/lt-hash.js +51 -0
  133. package/lib/Utils/make-mutex.d.ts +7 -0
  134. package/lib/Utils/make-mutex.js +43 -0
  135. package/lib/Utils/messages-media.d.ts +124 -0
  136. package/lib/Utils/messages-media.js +887 -0
  137. package/lib/Utils/messages.d.ts +75 -0
  138. package/lib/Utils/messages.js +1030 -0
  139. package/lib/Utils/noise-handler.d.ts +19 -0
  140. package/lib/Utils/noise-handler.js +150 -0
  141. package/lib/Utils/process-message.d.ts +42 -0
  142. package/lib/Utils/process-message.js +385 -0
  143. package/lib/Utils/signal.d.ts +33 -0
  144. package/lib/Utils/signal.js +153 -0
  145. package/lib/Utils/streamToBuffer.js +15 -0
  146. package/lib/Utils/use-multi-file-auth-state.d.ts +12 -0
  147. package/lib/Utils/use-multi-file-auth-state.js +125 -0
  148. package/lib/Utils/validate-connection.d.ts +10 -0
  149. package/lib/Utils/validate-connection.js +173 -0
  150. package/lib/WABinary/constants.d.ts +27 -0
  151. package/lib/WABinary/constants.js +1303 -0
  152. package/lib/WABinary/decode.d.ts +6 -0
  153. package/lib/WABinary/decode.js +265 -0
  154. package/lib/WABinary/encode.d.ts +2 -0
  155. package/lib/WABinary/encode.js +250 -0
  156. package/lib/WABinary/generic-utils.d.ts +14 -0
  157. package/lib/WABinary/generic-utils.js +110 -0
  158. package/lib/WABinary/index.d.ts +5 -0
  159. package/lib/WABinary/index.js +21 -0
  160. package/lib/WABinary/jid-utils.d.ts +36 -0
  161. package/lib/WABinary/jid-utils.js +83 -0
  162. package/lib/WABinary/jid-utils.js.bak +83 -0
  163. package/lib/WABinary/types.d.ts +18 -0
  164. package/lib/WABinary/types.js +2 -0
  165. package/lib/WAM/BinaryInfo.d.ts +8 -0
  166. package/lib/WAM/BinaryInfo.js +13 -0
  167. package/lib/WAM/constants.d.ts +38 -0
  168. package/lib/WAM/constants.js +15350 -0
  169. package/lib/WAM/encode.d.ts +2 -0
  170. package/lib/WAM/encode.js +155 -0
  171. package/lib/WAM/index.d.ts +3 -0
  172. package/lib/WAM/index.js +19 -0
  173. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +9 -0
  174. package/lib/WAUSync/Protocols/USyncContactProtocol.js +32 -0
  175. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +22 -0
  176. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +57 -0
  177. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +12 -0
  178. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +30 -0
  179. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +12 -0
  180. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +42 -0
  181. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +25 -0
  182. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +53 -0
  183. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +8 -0
  184. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +24 -0
  185. package/lib/WAUSync/Protocols/index.d.ts +4 -0
  186. package/lib/WAUSync/Protocols/index.js +20 -0
  187. package/lib/WAUSync/USyncQuery.d.ts +28 -0
  188. package/lib/WAUSync/USyncQuery.js +89 -0
  189. package/lib/WAUSync/USyncUser.d.ts +12 -0
  190. package/lib/WAUSync/USyncUser.js +26 -0
  191. package/lib/WAUSync/index.d.ts +3 -0
  192. package/lib/WAUSync/index.js +19 -0
  193. package/lib/index.d.ts +16 -0
  194. package/lib/index.js +60 -0
  195. package/lib/index.js.bak +56 -0
  196. package/package.json +110 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 yupra
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,459 @@
1
+ <div align="center">
2
+ <h1>✨ @rexxhayanasi/elaina-baileys</h1>
3
+ <p><em>Custom WhatsApp library built upon Baileys — enhanced, modernized, and elegant ✨</em></p>
4
+
5
+ <img src="https://files.catbox.moe/dmz2fn.jpg" width="300" alt="Elaina Bail Banner" />
6
+
7
+
8
+
9
+ ---
10
+
11
+ <p>
12
+ <a href="https://www.npmjs.com/package/@rexxhayanasi/elaina-baileys">
13
+ <img src="https://img.shields.io/npm/v/@rexxhayanasi/elaina-baileys?color=blueviolet&label=version&logo=npm" alt="npm version" />
14
+ </a>
15
+ <a href="https://www.npmjs.com/package/@rexxhayanasi/elaina-baileys">
16
+ <img src="https://img.shields.io/npm/dt/@rexxhayanasi/elaina-bail?color=blueviolet&label=downloads&logo=npm" alt="npm downloads" />
17
+ </a>
18
+ <a href="https://whatsapp.com/channel/0029VbBmm3n0gcfR7ZFFSV1D">
19
+ <img src="https://img.shields.io/badge/Join-WhatsApp%20Channel-25D366?logo=whatsapp&logoColor=white" alt="WhatsApp Channel" />
20
+ </a>
21
+ </p>
22
+ </div>
23
+ <p align="center">
24
+ <a href="https://elaina-bail.vercel.app">
25
+ <img src="https://img.shields.io/badge/Dokumentasi-Baileys-blue?style=for-the-badge&logo=readthedocs&logoColor=white" alt="Lihat Dokumentasi">
26
+ </a>
27
+ </p>
28
+
29
+ ---
30
+
31
+ ## 📌 Overview
32
+
33
+ > `elaina-baileys` is a refined version of the Baileys library with cleaner API usage, exclusive features like album messaging, newsletter controls, and full-size profile uploads — tailored for modern WhatsApp automation needs.
34
+
35
+ > `Update`
36
+ + All update information is now redirected to the WhatsApp channel
37
+ [!]<a href="https://whatsapp.com/channel/0029VbBmm3n0gcfR7ZFFSV1D">
38
+ <img src="https://img.shields.io/badge/Join-WhatsApp%20Channel-25D366?logo=whatsapp&logoColor=white" alt="WhatsApp Channel" />
39
+ </a>
40
+
41
+ ## 📦 Installation
42
+
43
+ ### Via `package.json` Fork Baileys (NPM)
44
+ @whiskeysockets/baileys
45
+ ```json
46
+ "dependencies": {
47
+ "@whiskeysockets/baileys": "npm:@rexxhayanasi/elaina-baileys"
48
+ }
49
+ ```
50
+ @adiwajsing/baileys
51
+ ```json
52
+ "dependencies": {
53
+ "@adiwajshing/baileys": "npm:@rexxhayanasi/elaina-baileys"
54
+ }
55
+ ```
56
+
57
+ Or via terminal
58
+ ```bash
59
+ npm install elaina-bail@npm:@rexxhayanasi/elaina-baileys
60
+ ```
61
+
62
+ Importing (**for those who don't fork another repository**)
63
+
64
+ ESM
65
+ ```bash
66
+ import makeWASocket from '@rexxhayanasi/elaina-baileys'
67
+ ```
68
+
69
+ CJS
70
+ ```bash
71
+ const { default: makeWASocket } = require('@rexxhayanasi/elaina-bail')
72
+ ```
73
+
74
+
75
+ ---
76
+
77
+ ## 🌟 Key Features
78
+
79
+ | Category | Description |
80
+ |------------------|-----------------------------------------------------------------------------|
81
+ | 📢 Channels | Seamlessly send messages to WhatsApp Channels. |
82
+ | 🖱️ Buttons | Create interactive messages with button options and quick replies. |
83
+ | 🖼️ Albums | Send grouped images or videos as an album (carousel-like format). |
84
+ | 👤 LID Grouping | Handle group operations using the latest @lid addressing style. |
85
+ | 🤖 AI Message Style | Add a stylized “AI” icon to messages. |
86
+ | 📷 HD Profile Pics | Upload full-size profile pictures without cropping. |
87
+ | 🔐 Pairing Code | Generate custom alphanumeric pairing codes. |
88
+ | 🛠️ Dev Experience | Reduced noise from logs with optimized libsignal printouts. |
89
+
90
+ ---
91
+
92
+ ## 💡 Use Case Examples
93
+
94
+ <details>
95
+ <summary><strong>📬 Newsletter Control</strong></summary>
96
+
97
+ ```javascript
98
+ // Create a newsletter
99
+ await sock.newsletterCreate("Elaina Updates");
100
+
101
+ // Change description
102
+ await sock.newsletterUpdateDescription("elaina@newsletter", "Fresh updates weekly");
103
+
104
+ // Send a reaction to a channel message
105
+ await sock.newsletterReactMessage("elaina@newsletter", "175", "🔥");
106
+ ```
107
+
108
+ </details>
109
+
110
+ <details>
111
+ <summary><strong>📌 Interactive Messaging</strong></summary>
112
+
113
+ ```javascript
114
+ const buttons = [
115
+ { buttonId: 'btn1', buttonText: { displayText: 'Click Me' }, type: 1 },
116
+ { buttonId: 'btn2', buttonText: { displayText: 'Visit Site' }, type: 1 }
117
+ ];
118
+
119
+ const msg = {
120
+ text: "Choose one:",
121
+ footer: "From Elaina with love 💜",
122
+ buttons,
123
+ headerType: 1
124
+ };
125
+
126
+ await sock.sendMessage(id, msg, { quoted: null });
127
+ ```
128
+
129
+ </details>
130
+
131
+ <details>
132
+ <summary><strong>🖼️ Send Album</strong></summary>
133
+
134
+ ```javascript
135
+ const media = [
136
+ { image: { url: "https://example.com/pic1.jpg" } },
137
+ { video: { url: "https://example.com/clip.mp4" } }
138
+ ];
139
+
140
+ await sock.sendMessage(id, { album: media, caption: "Memories 💫" }, { quoted: null });
141
+ ```
142
+
143
+ </details>
144
+
145
+ <details>
146
+ <summary><strong>🔐 Pairing with Custom Code</strong></summary>
147
+
148
+ ```javascript
149
+ const code = await sock.requestPairingCode("62xxxxxxxxxx", "ELAINA01");
150
+ console.log("Your Pairing Code:", code);
151
+ ```
152
+
153
+ </details>
154
+
155
+ <details>
156
+ <summary><strong>📊 Poll Creation</strong></summary>
157
+
158
+ ```javascript
159
+ const pollMessage = {
160
+ name: "Favorite Color?",
161
+ values: ["Red", "Blue", "Green"],
162
+ selectableCount: 1
163
+ };
164
+
165
+ await sock.sendMessage(id, { poll: pollMessage });
166
+ ```
167
+
168
+ </details>
169
+
170
+ <details>
171
+ <summary><strong>📍 Location Sharing</strong></summary>
172
+
173
+ ```javascript
174
+ const locationMessage = {
175
+ degreesLatitude: 37.422,
176
+ degreesLongitude: -122.084,
177
+ name: "Googleplex",
178
+ address: "1600 Amphitheatre Pkwy, Mountain View, CA 94043"
179
+ };
180
+
181
+ await sock.sendMessage(id, { location: locationMessage });
182
+ ```
183
+
184
+ </details>
185
+
186
+ <details>
187
+ <summary><strong>👥 Group Management</strong></summary>
188
+
189
+ ```javascript
190
+ // Create group
191
+ const group = await sock.groupCreate("My New Group", [number1, number2]);
192
+
193
+ // Add participants
194
+ await sock.groupAdd(group.id, [number3, number4]);
195
+
196
+ // Change group description
197
+ await sock.groupUpdateDescription(group.id, "This is our awesome group!");
198
+ ```
199
+
200
+ </details>
201
+
202
+ ---
203
+
204
+ **Note:** Replace `id` with the actual recipient ID and `sock` with your WhatsApp socket connection variable.
205
+
206
+ ---
207
+
208
+ ## 🐞 Found a Bug?
209
+
210
+ Please open an issue at [ *UNCOMING WEBSITE* ]
211
+ Or contact the maintainer directly via WhatsApp:
212
+
213
+ <p align="center">
214
+ <a href="https://wa.me/6285282530851" target="_blank">
215
+ <img alt="WhatsApp" src="https://img.shields.io/badge/Chat%20on%20WhatsApp-25D366?style=for-the-badge&logo=whatsapp&logoColor=white">
216
+ </a>
217
+ </p>
218
+
219
+ ---
220
+
221
+ <details>
222
+ <summary>🙏 <strong>TQTO (Thanks To)</strong></summary>
223
+
224
+ Terima kasih kepada pihak-pihak yang telah memberikan dukungan, inspirasi, dan kontribusi secara langsung maupun tidak langsung dalam pengembangan proyek ini:
225
+
226
+ - **Allah SWT**
227
+ For all His grace and ease.
228
+
229
+ - **Parent**
230
+ For your continued love, prayers, and support.
231
+
232
+ - **[Nstar-Y / Nstar-bail](https://github.com/Nstar-Y)**
233
+ As an initial foundation and reference in the development of this system.
234
+
235
+ - **[RexxHayanasi](https://github.com/RexxHayanasi)** (Me)
236
+ The main developer of this project.
237
+
238
+ </details>
239
+
240
+ > [!CAUTION]
241
+ > Built on top of the WhiskeySockets/Baileys project. All original core logic credits go to their team. elaina-bail extends it with thoughtful UX and DX improvements.
242
+
243
+ ---
244
+
245
+ ### 🙌 Contributors outside the Baileys code
246
+
247
+ Thanks to the following awesome contributors who help improve this project 💖
248
+
249
+ <table>
250
+ <tr>
251
+ <td align="center">
252
+ <a href="https://github.com/RexxHayanasi">
253
+ <img src="https://avatars.githubusercontent.com/u/150516773?v=4" width="80px;" style="border-radius:50%;" alt="Matstoree"/>
254
+ <br />
255
+ <sub><b>RexxHayanasi [ developer project ]</b></sub>
256
+ </a>
257
+ </td>
258
+ <td align="center">
259
+ <a href="https://github.com/kiuur">
260
+ <img src="https://avatars.githubusercontent.com/u/182334162?v=4" width="80px;" style="border-radius:50%;" alt="Matstoree"/>
261
+ <br />
262
+ <sub><b>Kyuu [ kiuur ]</b></sub>
263
+ </a>
264
+ </td>
265
+ <td align="center">
266
+ <a href="https://github.com/iconic05">
267
+ <img src="https://avatars.githubusercontent.com/u/197745110?v=4" width="80px;" style="border-radius:50%;" alt="iconic05"/>
268
+ <br />
269
+ <sub><b>iconic05</b></sub>
270
+ </a>
271
+ </td>
272
+ </tr>
273
+ </table>```
274
+
275
+
276
+ ---
277
+
278
+ ## 🌟 Key Features
279
+
280
+ | Category | Description |
281
+ |------------------|-----------------------------------------------------------------------------|
282
+ | 📢 Channels | Seamlessly send messages to WhatsApp Channels. |
283
+ | 🖱️ Buttons | Create interactive messages with button options and quick replies. |
284
+ | 🖼️ Albums | Send grouped images or videos as an album (carousel-like format). |
285
+ | 👤 LID Grouping | Handle group operations using the latest @lid addressing style. |
286
+ | 🤖 AI Message Style | Add a stylized “AI” icon to messages. |
287
+ | 📷 HD Profile Pics | Upload full-size profile pictures without cropping. |
288
+ | 🔐 Pairing Code | Generate custom alphanumeric pairing codes. |
289
+ | 🛠️ Dev Experience | Reduced noise from logs with optimized libsignal printouts. |
290
+
291
+ ---
292
+
293
+ ## 💡 Use Case Examples
294
+
295
+ <details>
296
+ <summary><strong>📬 Newsletter Control</strong></summary>
297
+
298
+ ```javascript
299
+ // Create a newsletter
300
+ await sock.newsletterCreate("BinaryCrafters Updates");
301
+
302
+ // Change description
303
+ await sock.newsletterUpdateDescription("BinaryCrafters@newsletter", "Fresh updates weekly");
304
+
305
+ // Send a reaction to a channel message
306
+ await sock.newsletterReactMessage("BinaryCrafters@newsletter", "175", "🔥");
307
+ ```
308
+
309
+ </details>
310
+
311
+ <details>
312
+ <summary><strong>📌 Interactive Messaging</strong></summary>
313
+
314
+ ```javascript
315
+ const buttons = [
316
+ { buttonId: 'btn1', buttonText: { displayText: 'Click Me' }, type: 1 },
317
+ { buttonId: 'btn2', buttonText: { displayText: 'Visit Site' }, type: 1 }
318
+ ];
319
+
320
+ const msg = {
321
+ text: "Choose one:",
322
+ footer: "From BinaryCrafters with love 💜",
323
+ buttons,
324
+ headerType: 1
325
+ };
326
+
327
+ await sock.sendMessage(id, msg, { quoted: null });
328
+ ```
329
+
330
+ </details>
331
+
332
+ <details>
333
+ <summary><strong>🖼️ Send Album</strong></summary>
334
+
335
+ ```javascript
336
+ const media = [
337
+ { image: { url: "https://example.com/pic1.jpg" } },
338
+ { video: { url: "https://example.com/clip.mp4" } }
339
+ ];
340
+
341
+ await sock.sendMessage(id, { album: media, caption: "Memories 💫" }, { quoted: null });
342
+ ```
343
+
344
+ </details>
345
+
346
+ <details>
347
+ <summary><strong>🔐 Pairing with Custom Code</strong></summary>
348
+
349
+ ```javascript
350
+ const code = await sock.requestPairingCode("62xxxxxxxxxx", "ELAINA01");
351
+ console.log("Your Pairing Code:", code);
352
+ ```
353
+
354
+ </details>
355
+
356
+ <details>
357
+ <summary><strong>📊 Poll Creation</strong></summary>
358
+
359
+ ```javascript
360
+ const pollMessage = {
361
+ name: "Favorite Color?",
362
+ values: ["Red", "Blue", "Green"],
363
+ selectableCount: 1
364
+ };
365
+
366
+ await sock.sendMessage(id, { poll: pollMessage });
367
+ ```
368
+
369
+ </details>
370
+
371
+ <details>
372
+ <summary><strong>📍 Location Sharing</strong></summary>
373
+
374
+ ```javascript
375
+ const locationMessage = {
376
+ degreesLatitude: 37.422,
377
+ degreesLongitude: -122.084,
378
+ name: "Googleplex",
379
+ address: "1600 Amphitheatre Pkwy, Mountain View, CA 94043"
380
+ };
381
+
382
+ await sock.sendMessage(id, { location: locationMessage });
383
+ ```
384
+
385
+ </details>
386
+
387
+ <details>
388
+ <summary><strong>👥 Group Management</strong></summary>
389
+
390
+ ```javascript
391
+ // Create group
392
+ const group = await sock.groupCreate("My New Group", [number1, number2]);
393
+
394
+ // Add participants
395
+ await sock.groupAdd(group.id, [number3, number4]);
396
+
397
+ // Change group description
398
+ await sock.groupUpdateDescription(group.id, "This is our awesome group!");
399
+ ```
400
+
401
+ </details>
402
+
403
+ ---
404
+
405
+ **Note:** Replace `id` with the actual recipient ID and `sock` with your WhatsApp socket connection variable.
406
+
407
+ ---
408
+
409
+ ## 🐞 Found a Bug?
410
+
411
+ Please open an issue at [ *UNCOMING WEBSITE* ]
412
+ Or contact the maintainer directly via WhatsApp:
413
+
414
+ <p align="center">
415
+ <a href="https://wa.me/6285282530851" target="_blank">
416
+ <img alt="WhatsApp" src="https://img.shields.io/badge/Chat%20on%20WhatsApp-25D366?style=for-the-badge&logo=whatsapp&logoColor=white">
417
+ </a>
418
+ </p>
419
+
420
+ ---
421
+
422
+ <details>
423
+ <summary>🙏 <strong>TQTO (Thanks To)</strong></summary>
424
+
425
+ Terima kasih kepada pihak-pihak yang telah memberikan dukungan, inspirasi, dan kontribusi secara langsung maupun tidak langsung dalam pengembangan proyek ini:
426
+
427
+ - **Allah SWT**
428
+ For all His grace and ease.
429
+
430
+ - **Parent**
431
+ For your continued love, prayers, and support.
432
+
433
+
434
+ - **[RexxHayanasi](https://github.com/RexxHayanasi)** (Project Development)
435
+ The main developer of this project.
436
+
437
+
438
+ </details>
439
+
440
+ > [!CAUTION]
441
+ > Built on top of the WhiskeySockets/Baileys project. All original core logic credits go to their team. elaina-bail extends it with thoughtful UX and DX improvements.
442
+
443
+ ---
444
+
445
+ ### 🙌 Contributors outside the Baileys code
446
+
447
+ Thanks to the following awesome contributors who help improve this project 💖
448
+
449
+ <table>
450
+ <tr>
451
+ <td align="center">
452
+ <a href="https://github.com/RexxHayanasi">
453
+ <img src="https://avatars.githubusercontent.com/u/150516773?v=4" width="80px;" style="border-radius:50%;" alt="RexxHayanasi"/>
454
+ <br />
455
+ <sub><b>RexxHayanasi [ developer project ]</b></sub>
456
+ </a>
457
+ </td>
458
+ </tr>
459
+ </table>
@@ -0,0 +1,4 @@
1
+ yarn pbjs -t static-module -w commonjs -o ./WAProto/index.js ./WAProto/WAProto.proto;
2
+ yarn pbts -o ./WAProto/index.d.ts ./WAProto/index.js;
3
+
4
+ #protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_opt=env=node,useOptionals=true,forceLong=long --ts_proto_out=. ./src/Binary/WAMessage.proto;