@kaels/casileys 0.4.2 → 0.4.5

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 (69) hide show
  1. package/README.md +1099 -539
  2. package/WAProto/index.d.ts +237 -34
  3. package/WAProto/index.js +1729 -211
  4. package/lib/Defaults/index.d.ts +8 -2
  5. package/lib/Defaults/index.d.ts.map +1 -1
  6. package/lib/Defaults/index.js +12 -6
  7. package/lib/Defaults/index.js.map +1 -1
  8. package/lib/Socket/business.d.ts +1 -1
  9. package/lib/Socket/chats.d.ts +8 -1
  10. package/lib/Socket/chats.d.ts.map +1 -1
  11. package/lib/Socket/chats.js +13 -8
  12. package/lib/Socket/chats.js.map +1 -1
  13. package/lib/Socket/communities.d.ts +1 -1
  14. package/lib/Socket/groups.d.ts +1 -1
  15. package/lib/Socket/index.d.ts +1 -1
  16. package/lib/Socket/index.js +2 -19
  17. package/lib/Socket/messages-recv.d.ts +1 -1
  18. package/lib/Socket/messages-send.d.ts +1 -1
  19. package/lib/Socket/newsletter.d.ts +1 -1
  20. package/lib/Socket/socket.d.ts.map +1 -1
  21. package/lib/Socket/socket.js +3 -0
  22. package/lib/Socket/socket.js.map +1 -1
  23. package/lib/Store/make-in-memory-store.js +2 -2
  24. package/lib/Utils/auth-utils.d.ts.map +1 -1
  25. package/lib/Utils/auth-utils.js +5 -1
  26. package/lib/Utils/auth-utils.js.map +1 -1
  27. package/lib/Utils/browser-utils.d.ts +2 -1
  28. package/lib/Utils/browser-utils.d.ts.map +1 -1
  29. package/lib/Utils/browser-utils.js +2 -1
  30. package/lib/Utils/browser-utils.js.map +1 -1
  31. package/lib/Utils/chat-utils.js +1 -1
  32. package/lib/Utils/decode-wa-message.d.ts.map +1 -1
  33. package/lib/Utils/decode-wa-message.js +6 -0
  34. package/lib/Utils/decode-wa-message.js.map +1 -1
  35. package/lib/Utils/event-buffer.js +1 -1
  36. package/lib/Utils/generics.d.ts +1 -1
  37. package/lib/Utils/generics.js +10 -10
  38. package/lib/Utils/group-status.d.ts +58 -0
  39. package/lib/Utils/group-status.js +477 -0
  40. package/lib/Utils/index.d.ts +1 -0
  41. package/lib/Utils/index.js +2 -0
  42. package/lib/Utils/index.js.map +1 -1
  43. package/lib/Utils/messages.d.ts +4 -4
  44. package/lib/Utils/messages.d.ts.map +1 -1
  45. package/lib/Utils/messages.js +32 -64
  46. package/lib/Utils/messages.js.map +1 -1
  47. package/lib/Utils/process-message.d.ts.map +1 -1
  48. package/lib/Utils/process-message.js.map +1 -1
  49. package/lib/Utils/rich-message-utils.d.ts +1 -1
  50. package/lib/Utils/rich-message-utils.d.ts.map +1 -1
  51. package/lib/Utils/rich-message-utils.js +124 -12
  52. package/lib/Utils/rich-message-utils.js.map +1 -1
  53. package/lib/Utils/tc-token-utils.d.ts.map +1 -1
  54. package/lib/Utils/tc-token-utils.js +3 -2
  55. package/lib/Utils/tc-token-utils.js.map +1 -1
  56. package/lib/Utils/use-single-file-auth-state.js +1 -1
  57. package/lib/Utils/use-sqlite-auth-state.d.ts +11 -0
  58. package/lib/Utils/use-sqlite-auth-state.d.ts.map +1 -0
  59. package/lib/Utils/use-sqlite-auth-state.js +109 -0
  60. package/lib/Utils/use-sqlite-auth-state.js.map +1 -0
  61. package/lib/Utils/validate-connection.d.ts.map +1 -1
  62. package/lib/Utils/validate-connection.js +9 -2
  63. package/lib/Utils/validate-connection.js.map +1 -1
  64. package/lib/WABinary/constants.d.ts +16 -0
  65. package/lib/WABinary/constants.d.ts.map +1 -1
  66. package/lib/WABinary/constants.js +99 -5
  67. package/lib/WABinary/constants.js.map +1 -1
  68. package/lib/WABinary/generic-utils.js +1 -1
  69. package/package.json +109 -105
package/README.md CHANGED
@@ -1,82 +1,99 @@
1
- # 🌸 @kaels/casileys
2
1
 
3
- [![Logo](https://raw.githubusercontent.com/kyleee-max/mutsumi-file/main/uploads/1779033636326.jpeg)](https://www.npmjs.com/package/@kaels/casileys)
2
+ <h1 align="center">🌱 Casileys</h1>
3
+ <p align="center">
4
+ <img src="./casileys-header.gif" alt="Casileys" width="100%">
5
+ </p>
6
+
7
+
8
+ <p align="center">
9
+ A WhatsApp Web API library for Node.js, based on Baileys and extended with additional message types, media handling, interactive messages, newsletter support, and more.
10
+ </p>
4
11
 
5
12
  <p align="center">
6
- <a href="https://www.npmjs.com/package/@kaels/casileys">
7
- <img src="https://img.shields.io/npm/v/@kaels/casileys?style=for-the-badge&logo=npm"/>
8
- </a>
9
- <a href="https://www.npmjs.com/package/@kaels/casileys">
10
- <img src="https://img.shields.io/npm/dm/@kaels/casileys?style=for-the-badge&logo=npm"/>
11
- </a>
12
- <a href="https://github.com/kyleee-max/casileys">
13
- <img src="https://img.shields.io/github/stars/kyleee-max/casileys?style=for-the-badge&logo=github"/>
14
- </a>
15
- <a href="LICENSE">
16
- <img src="https://img.shields.io/badge/license-MIT-blue?style=for-the-badge"/>
17
- </a>
18
- <a href="https://nodejs.org">
19
- <img src="https://img.shields.io/badge/node-%3E%3D20-339933?logo=node.js&labelColor=green&logoColor=white&style=for-the-badge"/>
20
- </a>
21
- <a href="#">
22
- <img src="https://img.shields.io/badge/ESM-only?logo=javascript&labelColor=yellow&logoColor=black&style=for-the-badge"/>
23
- </a>
13
+ <a href="https://npmjs.com/package/@kaels/casileys"><img src="https://img.shields.io/npm/v/@kaels/casileys?style=for-the-badge&logo=npm"/></a>
14
+ <a href="https://npmjs.com/package/@kaels/casileys"><img src="https://img.shields.io/npm/dm/@kaels/casileys?style=for-the-badge&logo=npm"/></a>
15
+ <a href="https://github.com/kyleee-max/casileys"><img src="https://img.shields.io/github/stars/kyleee-max/casileys?style=for-the-badge&logo=github"/></a>
16
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue?style=for-the-badge"/></a>
17
+ <a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D20-339933?logo=node.js&labelColor=green&logoColor=white&style=for-the-badge"/></a>
18
+ <a href="#"><img src="https://img.shields.io/badge/ESM-only?logo=javascript&labelColor=yellow&logoColor=black&style=for-the-badge"/></a>
24
19
  </p>
25
20
 
26
21
  ---
27
22
 
28
- ## 🙏 A Note & Apology
23
+ ## ✨ Highlights
29
24
 
30
- > [!IMPORTANT]
31
- > Saya ingin menyampaikan permohonan maaf yang tulus kepada **[@itsliaaa](https://github.com/itsliaaa)** selaku penulis fork [`@itsliaaa/baileys`**, yang menjadi dasar awal dari package ini.
32
- >
33
- > Pada awalnya, `@kaels/casileys` dibuat berdasarkan fork tersebut tanpa memberikan atribusi yang layak — hal itu tidak benar dan saya mengakuinya.
34
- >
35
- > **Terima kasih banyak kepada @itsliaaa** atas kerja kerasnya dalam membangun dan memelihara fork yang luar biasa ini. Kontribusinya sangat berarti bagi komunitas WhatsApp bot.
36
- >
37
- > Ke depannya, `@kaels/casileys` akan dikembangkan secara mandiri sebagai proyek independen dengan modifikasi, perbaikan, dan arah yang berbeda — bukan lagi sekadar re-upload. Semua perubahan akan didokumentasikan secara transparan.
25
+ | Feature | Support |
26
+ |---|:---:|
27
+ | WhatsApp Web / Multi-device | ✅ |
28
+ | Pairing Code | ✅ |
29
+ | Text & Media Messages | ✅ |
30
+ | Albums | ✅ |
31
+ | Polls | ✅ |
32
+ | Interactive Messages | ✅ |
33
+ | Rich Responses | ✅ |
34
+ | Inline Entities | ✅ |
35
+ | Tables | ✅ |
36
+ | Group Status | ✅ |
37
+ | Sticker Pack | ✅ |
38
+ | Newsletter Messages | ✅ |
39
+ | Group Management | ✅ |
40
+ | Community Management | ✅ |
41
+ | Profile Management | ✅ |
42
+ | Business Features | ✅ |
43
+ | Privacy Management | ✅ |
44
+ | Message Editing & Deletion | ✅ |
45
+
46
+ Casileys is designed to remain readable and auditable while extending the functionality available from its upstream fork.
38
47
 
39
48
  ---
40
49
 
41
- ## ✨ Highlights
50
+ ## 🛠️ Internal Adjustments
42
51
 
43
- Package ini dirancang untuk penggunaan produksi dengan fokus pada kejelasan dan keamanan:
52
+ Casileys retains the existing message and protocol implementations from its fork base while adding project-specific improvements.
44
53
 
45
- - 🚫 Tanpa obfuscation — mudah dibaca dan diaudit.
46
- - 🔧 Dikembangkan secara aktif dengan modifikasi dan penyesuaian tersendiri.
54
+ Some of the included changes cover:
47
55
 
48
- > [!NOTE]
49
- > Proyek ini tidak dimaksudkan untuk menggantikan upstream Baileys maupun fork `@itsliaaa/baileys`.
56
+ - Newsletter media handling
57
+ - `makeInMemoryStore` support
58
+ - Extended interactive message support
59
+ - Album messages
60
+ - Group status messages
61
+ - Additional message wrappers
62
+ - Extended media handling
63
+ - Direct `externalAdReply` access
64
+ - Additional newsletter, group, community, profile, business, and privacy utilities
65
+ - Casileys Group Status Helper
50
66
 
51
67
  ---
52
68
 
53
- ## 📋 Table of Contents
54
-
55
- - [🙏 A Note & Apology](#-a-note--apology)
56
- - [✨ Highlights](#-highlights)
57
- - [📥 Installation](#-installation)
58
- - [🌐 Connect to WhatsApp](#-connect-to-whatsapp-quick-step)
59
- - [🗄️ Implementing Data Store](#️-implementing-data-store)
60
- - [🪪 WhatsApp IDs Explain](#-whatsapp-ids-explain)
61
- - [✉️ Sending Messages](#️-sending-messages)
62
- - [Text, Mention, Reaction, Pin, Forward, Contact, Location, Event, Poll](#-text)
63
- - [Rich Response, Code Block, Inline Entities, Table](#-rich-response)
64
- - [📁 Sending Media Messages](#-sending-media-messages)
65
- - [Image, Video, Sticker, Audio, Document, Album, Sticker Pack](#️-image)
66
- - [👉🏻 Sending Interactive Messages](#-sending-interactive-messages)
67
- - [Buttons, List, Native Flow, Carousel, Hydrated Template](#-buttons)
68
- - [💳 Sending Payment Messages](#-sending-payment-messages)
69
- - [👁️ Other Message Options](#️-other-message-options)
70
- - [♻️ Modify Messages](#️-modify-messages)
71
- - [🧰 Additional Contents](#-additional-contents)
72
- - [Group, Community, Profile, Business, Privacy, Newsletter, Events](#-group-management)
73
- - [📣 Credits](#-credits)
69
+ ## 📨 Message Compatibility
70
+
71
+ The message layer supports the following extended structures:
72
+
73
+ | Message Type | Available |
74
+ |---|:---:|
75
+ | Album | ✅ |
76
+ | Group Status | ✅ |
77
+ | Interactive | ✅ |
78
+ | Status Mention | ✅ |
79
+ | Sticker Pack | ✅ |
80
+ | Rich Response | ✅ |
81
+ | Code Block | ✅ |
82
+ | Inline Entities | ✅ |
83
+ | Table | ✅ |
84
+ | Payment-related Messages | ✅ |
85
+ | External Ad Reply | ✅ |
86
+ | View Once Variants | ✅ |
87
+ | Ephemeral | ✅ |
88
+ | Spoiler | ✅ |
89
+ | Lottie Sticker | ✅ |
90
+ | Raw Message | ✅ |
74
91
 
75
92
  ---
76
93
 
77
94
  ## 📥 Installation
78
95
 
79
- Via `package.json`:
96
+ **package.json**
80
97
 
81
98
  ```json
82
99
  "dependencies": {
@@ -84,66 +101,90 @@ Via `package.json`:
84
101
  }
85
102
  ```
86
103
 
87
- Via terminal:
104
+ **GitHub**
105
+
106
+ ```json
107
+ "dependencies": {
108
+ "@kaels/casileys": "github:kyleee-max/casileys"
109
+ }
110
+ ```
111
+
112
+ **Terminal**
88
113
 
89
114
  ```bash
90
115
  npm i @kaels/casileys@latest
91
116
  ```
92
117
 
93
- ### 🧩 Import
118
+ Or directly from GitHub:
119
+
120
+ ```bash
121
+ npm i github:kyleee-max/casileys
122
+ ```
94
123
 
95
- ```javascript
96
- // ESM
124
+ ---
125
+
126
+ ## 🧩 Import
127
+
128
+ **ESM**
129
+
130
+ ```js
97
131
  import { makeWASocket } from '@kaels/casileys'
132
+ ```
133
+
134
+ **CJS**
98
135
 
99
- // CJS
136
+ ```js
100
137
  const { makeWASocket } = require('@kaels/casileys')
101
138
  ```
102
139
 
103
140
  ---
104
141
 
105
- ## 🌐 Connect to WhatsApp (Quick Step)
142
+ ## 🌐 Connect to WhatsApp
106
143
 
107
- ```javascript
144
+ ```js
108
145
  import { makeWASocket, delay, DisconnectReason, useMultiFileAuthState } from '@kaels/casileys'
109
146
  import { Boom } from '@hapi/boom'
110
147
  import pino from 'pino'
111
148
 
149
+ // --- Connect with pairing code
112
150
  const myPhoneNumber = '6288888888888'
113
151
 
152
+ const logger = pino({ level: 'silent' })
153
+
114
154
  const connectToWhatsApp = async () => {
115
155
  const { state, saveCreds } = await useMultiFileAuthState('session')
116
156
 
117
157
  const sock = makeWASocket({
118
- logger: pino({ level: 'silent' }),
158
+ logger,
119
159
  auth: state
120
160
  })
121
-
122
161
  sock.ev.on('creds.update', saveCreds)
123
-
124
- sock.ev.on('connection.update', async (update) => {
162
+ sock.ev.on('connection.update', (update) => {
125
163
  const { connection, lastDisconnect } = update
126
-
127
164
  if (connection === 'connecting' && !sock.authState.creds.registered) {
128
165
  await delay(1500)
129
166
  const code = await sock.requestPairingCode(myPhoneNumber)
130
- console.log('🔗 Pairing code:', code)
167
+ console.log('🔗 Pairing code', ':', code)
131
168
  }
132
-
133
- if (connection === 'close') {
134
- const shouldReconnect = new Boom(lastDisconnect?.error)?.output?.statusCode !== DisconnectReason.loggedOut
135
- if (shouldReconnect) connectToWhatsApp()
169
+ else if (connection === 'close') {
170
+ const shouldReconnect = new Boom(connection?.lastDisconnect?.error)?.output?.statusCode !== DisconnectReason.loggedOut
171
+ console.log('⚠️ Connection closed because', lastDisconnect.error, ', reconnecting ', shouldReconnect)
172
+ if (shouldReconnect) {
173
+ connectToWhatsApp()
174
+ }
136
175
  }
137
-
138
- if (connection === 'open') {
139
- console.log('✅ Connected to WhatsApp')
176
+ else if (connection === 'open') {
177
+ console.log('✅ Successfully connected to WhatsApp')
140
178
  }
141
179
  })
142
-
143
180
  sock.ev.on('messages.upsert', async ({ messages }) => {
144
181
  for (const message of messages) {
145
182
  if (!message.message) continue
146
- await sock.sendMessage(message.key.remoteJid, { text: '👋🏻 Hello world' })
183
+
184
+ console.log('🔔 Got new message', ':', message)
185
+ await sock.sendMessage(message.key.remoteJid, {
186
+ text: '👋🏻 Hello world'
187
+ })
147
188
  }
148
189
  })
149
190
  }
@@ -151,256 +192,394 @@ const connectToWhatsApp = async () => {
151
192
  connectToWhatsApp()
152
193
  ```
153
194
 
154
- ### 🔐 Auth State
195
+ ---
196
+
197
+ ## 🔐 Auth State
155
198
 
156
- > [!NOTE]
157
- > Bisa gunakan `useSingleFileAuthState` sebagai alternatif `useMultiFileAuthState`. `useSingleFileAuthState` sudah memiliki mekanisme caching internal, sehingga tidak perlu wrap `state.keys` dengan `makeCacheableSignalKeyStore`.
199
+ You can use `useMultiFileAuthState` as the default authentication state implementation.
158
200
 
159
- ---
201
+ Experimental alternatives such as `useSingleFileAuthState` and `useSqliteAuthState` may also be used where supported.
160
202
 
161
- ## 🗄️ Implementing Data Store
203
+ ---
162
204
 
163
- > [!CAUTION]
164
- > Sangat disarankan membangun data store sendiri — menyimpan seluruh history chat di memory bisa menyebabkan RAM usage yang tinggi.
205
+ ## 🗄️ Data Store
165
206
 
166
- ```javascript
207
+ ```js
167
208
  import { makeWASocket, makeInMemoryStore, delay, DisconnectReason, useMultiFileAuthState } from '@kaels/casileys'
168
209
  import { Boom } from '@hapi/boom'
169
210
  import pino from 'pino'
170
211
 
212
+ const myPhoneNumber = '6288888888888'
213
+
214
+ // --- Create your store path
171
215
  const storePath = './store.json'
172
216
 
217
+ const logger = pino({ level: 'silent' })
173
218
  const connectToWhatsApp = async () => {
174
219
  const { state, saveCreds } = await useMultiFileAuthState('session')
175
220
 
176
- const sock = makeWASocket({ logger: pino({ level: 'silent' }), auth: state })
221
+ const sock = makeWASocket({
222
+ logger,
223
+ auth: state
224
+ })
225
+
226
+ const store = makeInMemoryStore({
227
+ logger,
228
+ socket: sock
229
+ })
177
230
 
178
- const store = makeInMemoryStore({ logger: pino({ level: 'silent' }), socket: sock })
179
231
  store.bind(sock.ev)
180
232
 
181
233
  sock.ev.on('creds.update', saveCreds)
234
+ sock.ev.on('connection.update', (update) => {
235
+ const { connection, lastDisconnect } = update
236
+ if (connection === 'connecting' && !sock.authState.creds.registered) {
237
+ await delay(1500)
238
+ const code = await sock.requestPairingCode(myPhoneNumber)
239
+ console.log('🔗 Pairing code', ':', code)
240
+ }
241
+ else if (connection === 'close') {
242
+ const shouldReconnect = new Boom(connection?.lastDisconnect?.error)?.output?.statusCode !== DisconnectReason.loggedOut
243
+ console.log('⚠️ Connection closed because', lastDisconnect.error, ', reconnecting ', shouldReconnect)
244
+ if (shouldReconnect) {
245
+ connectToWhatsApp()
246
+ }
247
+ }
248
+ else if (connection === 'open') {
249
+ console.log('✅ Successfully connected to WhatsApp')
250
+ }
251
+ })
252
+ sock.ev.on('chats.upsert', () => {
253
+ console.log('✉️ Got chats', store.chats.all())
254
+ })
255
+
256
+ sock.ev.on('contacts.upsert', () => {
257
+ console.log('👥 Got contacts', Object.values(store.contacts))
258
+ })
182
259
 
183
- // Baca store dari file
260
+ // --- Read store from file
184
261
  store.readFromFile(storePath)
185
262
 
186
- // Simpan store setiap 3 menit
187
- setInterval(() => store.writeToFile(storePath), 180_000)
263
+ // --- Save store every 3 minutes
264
+ setInterval(() => {
265
+ store.writeToFile(storePath)
266
+ }, 180000)
188
267
  }
189
268
 
190
269
  connectToWhatsApp()
191
270
  ```
192
271
 
272
+ > **Note:** For large applications, consider using a dedicated persistent data store instead of keeping the entire chat history in memory.
273
+
193
274
  ---
194
275
 
195
- ## 🪪 WhatsApp IDs Explain
276
+ ## 🪪 WhatsApp IDs
277
+
278
+ `jid` identifies the WhatsApp account, group, broadcast destination, newsletter, or status target involved in an operation.
196
279
 
197
- | Format | Keterangan |
280
+ | Target | Format |
198
281
  |---|---|
199
- | `628xxx@s.whatsapp.net` | User biasa |
200
- | `628xxx@lid` | User dengan Local Identifier |
201
- | `123456789-123456@g.us` | Grup |
202
- | `11111111111@bot` | Meta AI |
203
- | `status@broadcast` | Stories |
204
- | `[timestamp]@broadcast` | Broadcast list |
282
+ | User | `[country code][phone]@s.whatsapp.net` |
283
+ | LID | `[id]@lid` |
284
+ | Group | `[id]@g.us` |
285
+ | Meta AI | `[id]@bot` |
286
+ | Broadcast | `[timestamp]@broadcast` |
287
+ | Status | `status@broadcast` |
288
+ | Newsletter | `[id]@newsletter` |
289
+
290
+ For incoming messages, the destination is commonly available through:
291
+
292
+ ```js
293
+ message.key.remoteJid
294
+ ```
205
295
 
206
296
  ---
207
297
 
208
298
  ## ✉️ Sending Messages
209
299
 
210
- > [!NOTE]
211
- > `jid` bisa diambil dari `message.key.remoteJid`.
212
-
213
300
  ### 🔠 Text
214
301
 
215
- ```javascript
216
- // Teks biasa
217
- sock.sendMessage(jid, { text: '👋🏻 Hello' }, { quoted: message })
302
+ ```js
303
+ // --- Send a regular text message
304
+ sock.sendMessage(jid, {
305
+ text: '👋🏻 Hello'
306
+ }, {
307
+ quoted: message
308
+ })
218
309
 
219
- // Dengan link preview
310
+ // --- Send a text message with a link preview
311
+ const urlA = 'https://www.npmjs.com/package/@kaels/casileys'
220
312
  sock.sendMessage(jid, {
221
- text: 'https://www.npmjs.com/package/@kaels/casileys 👆🏻 Check it out!',
313
+ text: urlA + ' 👆🏻 Check it out!',
222
314
  linkPreview: {
223
- 'matched-text': 'https://www.npmjs.com/package/@kaels/casileys',
224
- title: '🌸 @kaels/casileys',
225
- description: 'WhatsApp Web API',
226
- previewType: 0,
315
+ 'matched-text': urlA,
316
+ title: '🌱 Casileys',
317
+ description: 'WhatsApp Web API for Node.js',
318
+ previewType: 0, // --- Use 1 for video playback in the link preview
227
319
  jpegThumbnail: fs.readFileSync('./path/to/image.jpg')
228
320
  }
229
321
  })
322
+
323
+ // --- Send a text message with a large link preview and favicon
324
+ import { prepareWAMessageMedia } from 'YOUR_CASILEYS_PACKAGE'
325
+ const urlB = 'https://www.npmjs.com/package/@kaels/casileys#readme'
326
+
327
+ const { imageMessage: image } = await prepareWAMessageMedia({
328
+ image: {
329
+ url: './path/to/image.jpg'
330
+ }
331
+ }, {
332
+ upload: sock.waUploadToServer,
333
+ mediaTypeOverride: 'thumbnail-link'
334
+ })
335
+
336
+ // --- Set the thumbnail display size
337
+ image.height = 720
338
+ image.width = 480
339
+ sock.sendMessage(jid, {
340
+ text: urlB + ' 👆🏻 Check it out!',
341
+ linkPreview: {
342
+ 'matched-text': urlB,
343
+ title: '🌱 Casileys',
344
+ description: 'WhatsApp Web API for Node.js',
345
+ previewType: 0,
346
+ jpegThumbnail: fs.readFileSync('./path/to/image.jpg'),
347
+ highQualityThumbnail: image,
348
+ linkPreviewMetadata: {
349
+ linkMediaDuration: 0, // --- Duration in seconds (for video/audio content)
350
+ socialMediaPostType: 1, // --- Enum: 0 = NONE, 1 = REEL, 2 = LIVE_VIDEO, 3 = LONG_VIDEO, 4 = SINGLE_IMAGE, 5 = CAROUSEL
351
+ } // --- Additional metadata for large link preview
352
+ },
353
+ favicon: {
354
+ url: './path/to/tiny-image.ico'
355
+ }
356
+ })
230
357
  ```
231
358
 
232
359
  ### 🔔 Mention
233
360
 
234
- ```javascript
235
- // Mention spesifik
361
+ ```js
362
+ // --- Regular mention
236
363
  sock.sendMessage(jid, {
237
364
  text: '👋🏻 Hello @628123456789',
238
365
  mentions: ['628123456789@s.whatsapp.net']
239
- }, { quoted: message })
366
+ }, {
367
+ quoted: message
368
+ })
240
369
 
241
- // Mention semua member grup
370
+ // --- Mention all
242
371
  sock.sendMessage(jid, {
243
372
  text: '👋🏻 Hello @all',
244
373
  mentionAll: true
245
- }, { quoted: message })
374
+ }, {
375
+ quoted: message
376
+ })
246
377
  ```
247
378
 
248
379
  ### 😁 Reaction
249
380
 
250
- ```javascript
381
+ ```js
251
382
  sock.sendMessage(jid, {
252
- react: { key: message.key, text: '✨' }
383
+ react: {
384
+ key: message.key,
385
+ text: '✨'
386
+ }
253
387
  })
254
388
  ```
255
389
 
256
390
  ### 📌 Pin Message
257
391
 
258
- ```javascript
392
+ ```js
259
393
  sock.sendMessage(jid, {
260
394
  pin: message.key,
261
- time: 86400, // 86400 (1d) | 604800 (7d) | 2592000 (30d)
262
- type: 1 // 2 untuk unpin
395
+ time: 86400, // --- Set the value in seconds: 86400 (1d), 604800 (7d), or 2592000 (30d)
396
+ type: 1 // --- Or 2 to remove
397
+ })
398
+ ```
399
+
400
+ ### 🔖 Keep Chat
401
+
402
+ > **Note:** Keep Chat can only be used in chats or groups with disappearing messages enabled.
403
+
404
+ ```js
405
+ sock.sendMessage(jid, {
406
+ keep: message.key,
407
+ type: 1 // --- Or 2 to remove
263
408
  })
264
409
  ```
265
410
 
266
411
  ### ➡️ Forward Message
267
412
 
268
- ```javascript
269
- sock.sendMessage(jid, { forward: message, force: true })
413
+ ```js
414
+ sock.sendMessage(jid, {
415
+ forward: message,
416
+ force: true // --- Optional
417
+ })
270
418
  ```
271
419
 
272
420
  ### 👤 Contact
273
421
 
274
- ```javascript
275
- const vcard = 'BEGIN:VCARD\nVERSION:3.0\nFN:Kaelz\nTEL;type=CELL;waid=628123456789:+62 812 3456 789\nEND:VCARD'
422
+ ```js
423
+ const vcard = 'BEGIN:VCARD\n'
424
+ + 'VERSION:3.0\n'
425
+ + 'FN:Casileys User\n'
426
+ + 'ORG:Casileys;\n'
427
+ + 'TEL;type=CELL;type=VOICE;waid=628123456789:+62 8123 4567 89\n'
428
+ + 'END:VCARD'
276
429
 
277
430
  sock.sendMessage(jid, {
278
- contacts: { displayName: 'Kaelz', contacts: [{ vcard }] }
279
- }, { quoted: message })
431
+ contacts: {
432
+ displayName: 'Casileys User',
433
+ contacts: [
434
+ { vcard }
435
+ ]
436
+ }
437
+ }, {
438
+ quoted: message
439
+ })
280
440
  ```
281
441
 
282
442
  ### 📍 Location
283
443
 
284
- ```javascript
444
+ ```js
285
445
  sock.sendMessage(jid, {
286
- location: { degreesLatitude: -6.2, degreesLongitude: 106.8, name: '📍 Jakarta' }
287
- }, { quoted: message })
446
+ location: {
447
+ degreesLatitude: 24.121231,
448
+ degreesLongitude: 55.1121221,
449
+ name: '👋🏻 I am here'
450
+ }
451
+ }, {
452
+ quoted: message
453
+ })
288
454
  ```
289
455
 
290
456
  ### 🗓️ Event
291
457
 
292
- ```javascript
458
+ ```js
293
459
  sock.sendMessage(jid, {
294
460
  event: {
295
- name: '🎶 Meet & Mingle',
296
- description: 'Gathering seru bareng komunitas!',
297
- call: 'audio',
298
- startDate: new Date(Date.now() + 3_600_000),
299
- endDate: new Date(Date.now() + 28_800_000),
300
- location: { name: 'Jakarta', degreesLatitude: -6.2, degreesLongitude: 106.8 }
461
+ name: '🎶 Meet & Mingle Party',
462
+ description: 'Meet & Mingle Party is a fun, casual gathering to connect, chat, and build new relationships within the community.',
463
+ call: 'audio', // --- Or "video", this field is optional
464
+ startDate: new Date(Date.now() + 3600000),
465
+ endDate: new Date(Date.now() + 28800000),
466
+ isCancelled: false, // --- Optional
467
+ isScheduleCall: false, // --- Optional
468
+ extraGuestsAllowed: false, // --- Optional
469
+ location: {
470
+ name: 'Jakarta',
471
+ degreesLatitude: -6.2,
472
+ degreesLongitude: 106.8
473
+ }
301
474
  }
302
- }, { quoted: message })
475
+ }, {
476
+ quoted: message
477
+ })
303
478
  ```
304
479
 
305
- ### 📊 Poll
480
+ ### 👥 Group Invite
306
481
 
307
- ```javascript
308
- // Poll biasa
309
- sock.sendMessage(jid, {
310
- poll: {
311
- name: '🔥 Pilih yang terbaik!',
312
- values: ['Option A', 'Option B'],
313
- selectableCount: 1
314
- }
315
- }, { quoted: message })
316
- ```
482
+ ```js
483
+ const inviteCode = groupUrl
484
+ .split('chat.whatsapp.com/')[1]
485
+ ?.split('?')[0]
317
486
 
318
- ### 💭 Button Response
487
+ const groupJid = '1201111111111@g.us'
488
+ const groupName = 'Casileys'
319
489
 
320
- ```javascript
321
- // Plain button reply
322
490
  sock.sendMessage(jid, {
323
- type: 'plain',
324
- buttonReply: { id: '#Menu', displayText: '✨ Menu' }
325
- }, { quoted: message })
326
-
327
- // Interactive flow reply
328
- sock.sendMessage(jid, {
329
- flowReply: {
330
- format: 0,
331
- text: '💭 Response',
332
- name: 'menu_options',
333
- paramsJson: JSON.stringify({ id: '#Menu', description: 'Menu Utama' })
491
+ groupInvite: {
492
+ inviteCode,
493
+ inviteExpiration: Date.now() + 86400000,
494
+ text: '👋🏻 Hello, we invite you to join our group.',
495
+ jid: groupJid,
496
+ subject: groupName,
334
497
  }
335
- }, { quoted: message })
336
-
337
- // List reply
338
- sock.sendMessage(jid, {
339
- listReply: { title: '📄 See More', description: '✨ Menu', id: '#Menu' }
340
- }, { quoted: message })
498
+ }, {
499
+ quoted: message
500
+ })
341
501
  ```
342
502
 
343
- ### ✨ Rich Response
503
+ ### 🛍️ Product
344
504
 
345
- ```javascript
505
+ ```js
506
+ import { randomUUID } from 'crypto'
346
507
  sock.sendMessage(jid, {
347
- disclaimerText: 'Contoh Rich Response',
348
- richResponse: [
349
- { text: 'Contoh penggunaan:' },
350
- { language: 'javascript', code: [{ highlightType: 0, codeContent: 'console.log("Hello!")' }] },
351
- { text: 'Mudah, kan?' }
352
- ]
508
+ image: {
509
+ url: './path/to/image.jpg'
510
+ },
511
+ body: '👋🏻 Check my product here!',
512
+ footer: 'Casileys',
513
+ product: {
514
+ currencyCode: 'IDR',
515
+ description: '🛍️ Interesting product!',
516
+ priceAmount1000: 70_000_000,
517
+ productId: randomUUID(),
518
+ productImageCount: 1,
519
+ salePriceAmount1000: 65_000_000,
520
+ signedUrl: 'YOUR_PRODUCT_URL',
521
+ title: '📦 Casileys Product',
522
+ url: 'YOUR_PRODUCT_URL'
523
+ },
524
+ businessOwnerJid: '0@s.whatsapp.net'
353
525
  })
354
526
  ```
355
527
 
356
- > [!TIP]
357
- > Import `tokenizeCode` untuk syntax highlighting otomatis:
358
- > ```javascript
359
- > import { tokenizeCode } from '@kaels/casileys'
360
- > ```
361
-
362
- ### 🧾 Message with Code Block
528
+ ### 📊 Poll
363
529
 
364
- ```javascript
530
+ ```js
531
+ // --- Regular poll message
365
532
  sock.sendMessage(jid, {
366
- disclaimerText: 'Code Block',
367
- headerText: '## Contoh Kode',
368
- contentText: '---',
369
- code: 'console.log("Hello, World!")',
370
- language: 'javascript',
371
- footerText: 'Simpel kan?'
533
+ poll: {
534
+ name: '🔥 Voting time',
535
+ values: ['Yes', 'No'],
536
+ selectableCount: 1,
537
+ toAnnouncementGroup: false,
538
+ endDate: new Date(Date.now() + 28800000), // --- Optional
539
+ hideVoter: false, // --- Optional
540
+ canAddOption: false // --- Optional
541
+ }
542
+ }, {
543
+ quoted: message
372
544
  })
373
- ```
374
545
 
375
- ### 🌏 Message with Inline Entities (Links)
546
+ // --- Quiz (only for newsletter)
547
+ sock.sendMessage('1211111111111@newsletter', {
548
+ poll: {
549
+ name: '🔥 Quiz',
550
+ values: ['Yes', 'No'],
551
+ correctAnswer: 'Yes',
552
+ pollType: 1
553
+ }
554
+ }, {
555
+ quoted: message
556
+ })
376
557
 
377
- ```javascript
558
+ // --- Poll result
378
559
  sock.sendMessage(jid, {
379
- disclaimerText: 'Link List',
380
- headerText: '## Useful Links',
381
- contentText: '---',
382
- links: [
383
- { text: '1. npm', title: 'Package Registry', url: 'https://npmjs.com' },
384
- { text: '2. GitHub', title: 'Source Code', url: 'https://github.com' }
385
- ],
386
- footerText: '---'
560
+ pollResult: {
561
+ name: '📝 Poll Result',
562
+ votes: [{
563
+ name: 'Nice',
564
+ voteCount: 10
565
+ }, {
566
+ name: 'Nah',
567
+ voteCount: 2
568
+ }],
569
+ pollType: 0 // Or 1 for quiz
570
+ }
571
+ }, {
572
+ quoted: message
387
573
  })
388
- ```
389
-
390
- ### 📋 Message with Table
391
574
 
392
- ```javascript
575
+ // --- Poll update
393
576
  sock.sendMessage(jid, {
394
- disclaimerText: 'Tabel Perbandingan',
395
- headerText: '## Node.js vs Bun vs Deno',
396
- contentText: '---',
397
- title: 'Runtime Comparison',
398
- table: [
399
- ['', 'Node.js', 'Bun', 'Deno'],
400
- ['Engine', 'V8', 'JavaScriptCore', 'V8'],
401
- ['Performance', '4/5', '5/5', '4/5']
402
- ],
403
- footerText: 'Pilih yang sesuai kebutuhan!'
577
+ pollUpdate: {
578
+ metadata: {},
579
+ key: message.key
580
+ }
581
+ }, {
582
+ quoted: message
404
583
  })
405
584
  ```
406
585
 
@@ -408,221 +587,284 @@ sock.sendMessage(jid, {
408
587
 
409
588
  ## 📁 Sending Media Messages
410
589
 
411
- > [!NOTE]
412
- > Media bisa dikirim sebagai `Buffer`, `{ stream: Readable }`, atau `{ url: string }` (path lokal / URL).
413
-
414
590
  ### 🖼️ Image
415
591
 
416
- ```javascript
592
+ ```js
417
593
  sock.sendMessage(jid, {
418
- image: { url: './path/to/image.jpg' },
419
- caption: '🔥 Keren!'
420
- }, { quoted: message })
594
+ image: {
595
+ url: './path/to/image.jpg'
596
+ },
597
+ caption: '🖼️ Image'
598
+ }, {
599
+ quoted: message
600
+ })
421
601
  ```
422
602
 
423
603
  ### 🎥 Video
424
604
 
425
- ```javascript
605
+ ```js
426
606
  sock.sendMessage(jid, {
427
- video: { url: './path/to/video.mp4' },
428
- gifPlayback: false, // true untuk GIF
429
- ptv: false, // true untuk PTV
430
- caption: '🎬 Video keren!'
431
- }, { quoted: message })
607
+ video: {
608
+ url: './path/to/video.mp4'
609
+ },
610
+ caption: '🎥 Video'
611
+ }, {
612
+ quoted: message
613
+ })
432
614
  ```
433
615
 
434
616
  ### 📃 Sticker
435
617
 
436
- ```javascript
618
+ ```js
437
619
  sock.sendMessage(jid, {
438
- sticker: { url: './path/to/sticker.webp' }
439
- }, { quoted: message })
620
+ sticker: {
621
+ url: './path/to/sticker.webp'
622
+ }
623
+ }, {
624
+ quoted: message
625
+ })
440
626
  ```
441
627
 
442
628
  ### 💽 Audio
443
629
 
444
- ```javascript
630
+ ```js
445
631
  sock.sendMessage(jid, {
446
- audio: { url: './path/to/audio.mp3' },
447
- ptt: false // true untuk Voice Note
448
- }, { quoted: message })
632
+ audio: {
633
+ url: './path/to/audio.mp3'
634
+ },
635
+ mimetype: 'audio/mpeg',
636
+ ptt: false
637
+ }, {
638
+ quoted: message
639
+ })
449
640
  ```
450
641
 
451
642
  ### 🗂️ Document
452
643
 
453
- ```javascript
644
+ ```js
454
645
  sock.sendMessage(jid, {
455
- document: { url: './path/to/file.pdf' },
646
+ document: {
647
+ url: './path/to/document.pdf'
648
+ },
456
649
  mimetype: 'application/pdf',
457
- caption: '📄 Dokumen'
458
- }, { quoted: message })
650
+ fileName: 'document.pdf',
651
+ caption: '📄 Document'
652
+ }, {
653
+ quoted: message
654
+ })
459
655
  ```
460
656
 
461
- ### 🖼️ Album (Image & Video)
657
+ ---
658
+
659
+ ## 🖼️ Album
462
660
 
463
- ```javascript
661
+ ```js
464
662
  sock.sendMessage(jid, {
465
663
  album: [
466
- { image: { url: './img1.jpg' }, caption: 'Foto 1' },
467
- { video: { url: './vid1.mp4' }, caption: 'Video 1' },
468
- { image: { url: './img2.jpg' }, caption: 'Foto 2' }
664
+ {
665
+ image: {
666
+ url: './path/to/image-1.jpg'
667
+ }
668
+ },
669
+ {
670
+ image: {
671
+ url: './path/to/image-2.jpg'
672
+ }
673
+ },
674
+ {
675
+ video: {
676
+ url: './path/to/video.mp4'
677
+ }
678
+ }
469
679
  ]
470
- }, { quoted: message })
680
+ }, {
681
+ quoted: message
682
+ })
471
683
  ```
472
684
 
473
- ### 📦 Sticker Pack
685
+ ---
474
686
 
475
- > [!IMPORTANT]
476
- > Jika `sharp` atau `@napi-rs/image` tidak terinstall, `cover` dan `stickers` harus sudah dalam format WebP.
687
+ ## 📦 Sticker Pack
477
688
 
478
- ```javascript
689
+ ```js
479
690
  sock.sendMessage(jid, {
480
- cover: { url: './cover.webp' },
481
- stickers: [
482
- { data: { url: './sticker1.webp' } },
483
- { data: { url: './sticker2.webp' } }
484
- ],
485
- name: '📦 Sticker Pack Keren',
486
- publisher: 'Kaelz',
487
- description: '@kaels/casileys'
488
- }, { quoted: message })
691
+ stickerPack: {
692
+ name: 'Casileys Pack',
693
+ publisher: 'Casileys',
694
+ description: 'Casileys sticker pack'
695
+ }
696
+ }, {
697
+ quoted: message
698
+ })
489
699
  ```
490
700
 
491
701
  ---
492
702
 
493
- ## 👉🏻 Sending Interactive Messages
703
+ ## 👉🏻 Interactive Messages
494
704
 
495
705
  ### 🔘 Buttons
496
706
 
497
- ```javascript
498
- // Button teks biasa
707
+ ```js
499
708
  sock.sendMessage(jid, {
500
- text: '👆🏻 Pilih salah satu!',
501
- footer: '@kaels/casileys',
502
- buttons: [{ text: '👋🏻 Halo', id: '#Halo' }]
503
- }, { quoted: message })
504
-
505
- // Button dengan media & native flow
506
- sock.sendMessage(jid, {
507
- image: { url: './path/to/image.jpg' },
508
- caption: '👆🏻 Button + List!',
509
- footer: '@kaels/casileys',
510
- buttons: [{
511
- text: '📋 Pilih',
512
- sections: [{
513
- title: '✨ Section 1',
514
- rows: [{ title: '🏷️ Opsi A', description: '', id: '#OpsiA' }]
515
- }]
516
- }]
517
- }, { quoted: message })
709
+ buttons: [
710
+ {
711
+ buttonId: 'id1',
712
+ buttonText: {
713
+ displayText: 'Button 1'
714
+ },
715
+ type: 1
716
+ },
717
+ {
718
+ buttonId: 'id2',
719
+ buttonText: {
720
+ displayText: 'Button 2'
721
+ },
722
+ type: 1
723
+ }
724
+ ],
725
+ text: 'Select an option',
726
+ footer: 'Casileys'
727
+ }, {
728
+ quoted: message
729
+ })
518
730
  ```
519
731
 
520
732
  ### 📋 List
521
733
 
522
- > [!NOTE]
523
- > Hanya berfungsi di private chat (`@s.whatsapp.net`).
524
-
525
- ```javascript
526
- sock.sendMessage(jid, {
527
- text: '📋 Pilih menu!',
528
- footer: '@kaels/casileys',
529
- buttonText: '📋 Buka Menu',
530
- title: '👋🏻 Menu Bot',
531
- sections: [{
532
- title: '🚀 Kategori 1',
533
- rows: [{ title: '✨ Fitur A', description: 'Deskripsi singkat', rowId: '#FiturA' }]
534
- }]
535
- }, { quoted: message })
536
- ```
537
-
538
- ### 🗄️ Interactive (Native Flow)
539
-
540
- ```javascript
541
- // Native flow dengan berbagai tipe button
542
- sock.sendMessage(jid, {
543
- image: { url: './path/to/image.jpg' },
544
- caption: '🗄️ Interactive Menu!',
545
- footer: '@kaels/casileys',
546
- optionText: '👉🏻 Pilih Opsi', // optional, wrap semua jadi satu list
547
- optionTitle: '📄 Opsi Tersedia', // optional
548
- nativeFlow: [
549
- { text: '👋🏻 Greeting', id: '#Greeting', icon: 'review' },
550
- { text: '📞 Telepon', call: '628123456789' },
551
- { text: '📋 Copy', copy: '@kaels/casileys' },
552
- { text: '🌐 Buka Web', url: 'https://www.npmjs.com/package/@kaels/casileys', useWebview: true },
734
+ ```js
735
+ sock.sendMessage(jid, {
736
+ text: 'Select an option',
737
+ footer: 'Casileys',
738
+ title: 'Casileys Menu',
739
+ buttonText: 'Open',
740
+ sections: [
553
741
  {
554
- text: '📋 Pilih dari List',
555
- sections: [{
556
- title: '✨ Pilihan',
557
- rows: [{ title: '🏷️ Opsi 1', description: '', id: '#Opsi1' }]
558
- }],
559
- icon: 'default'
742
+ title: 'Menu',
743
+ rows: [
744
+ {
745
+ title: 'Option 1',
746
+ description: 'First option',
747
+ rowId: 'option_1'
748
+ },
749
+ {
750
+ title: 'Option 2',
751
+ description: 'Second option',
752
+ rowId: 'option_2'
753
+ }
754
+ ]
560
755
  }
561
756
  ]
562
- }, { quoted: message })
563
-
564
- // Carousel
565
- sock.sendMessage(jid, {
566
- text: '🎠 Carousel!',
567
- footer: '@kaels/casileys',
568
- cards: [{
569
- image: { url: './img1.jpg' },
570
- caption: '🖼️ Slide 1',
571
- footer: '📸 Caption',
572
- nativeFlow: [{ text: '🌐 Detail', url: 'https://npmjs.com', useWebview: true }]
573
- }, {
574
- image: { url: './img2.jpg' },
575
- caption: '🖼️ Slide 2',
576
- footer: '📸 Caption',
577
- nativeFlow: [{ text: '👍 Pilih', id: '#Pilih2' }]
578
- }]
579
- }, { quoted: message })
580
-
581
- // Native Flow dengan audio footer
582
- sock.sendMessage(jid, {
583
- text: '🎵 Dengarkan dulu!',
584
- audioFooter: { url: './audio.mp3' },
585
- nativeFlow: [
586
- { text: '👍🏻 Lanjut', id: '#Next', icon: 'review' },
587
- { text: '👎🏻 Skip', id: '#Skip', icon: 'default' }
588
- ]
589
- }, { quoted: message })
757
+ }, {
758
+ quoted: message
759
+ })
760
+ ```
761
+
762
+ ### 🗄️ Interactive
763
+
764
+ ```js
765
+ sock.sendMessage(jid, {
766
+ interactiveMessage: {
767
+ body: {
768
+ text: 'Casileys Interactive'
769
+ },
770
+ footer: {
771
+ text: 'Select an action'
772
+ },
773
+ nativeFlowMessage: {
774
+ buttons: [
775
+ {
776
+ name: 'quick_reply',
777
+ buttonParamsJson: JSON.stringify({
778
+ display_text: 'Open',
779
+ id: 'open'
780
+ })
781
+ }
782
+ ]
783
+ }
784
+ }
785
+ }, {
786
+ quoted: message
787
+ })
590
788
  ```
591
789
 
592
790
  ### 🫙 Hydrated Template
593
791
 
594
- ```javascript
792
+ ```js
595
793
  sock.sendMessage(jid, {
596
- title: '👋🏻 Halo!',
597
- image: { url: './path/to/image.jpg' },
598
- caption: '🫙 Template Message',
599
- footer: '@kaels/casileys',
600
- templateButtons: [
601
- { text: '👉🏻 Klik Sini', id: '#Klik' },
602
- { text: '🌐 Website', url: 'https://www.npmjs.com/package/@kaels/casileys' },
603
- { text: '📞 Hubungi', call: '628123456789' }
604
- ]
605
- }, { quoted: message })
794
+ hydratedTemplate: {
795
+ hydratedContentText: 'Casileys',
796
+ hydratedFooterText: 'WhatsApp Web API',
797
+ hydratedButtons: [
798
+ {
799
+ quickReplyButton: {
800
+ displayText: 'Open',
801
+ id: 'open'
802
+ }
803
+ }
804
+ ]
805
+ }
806
+ }, {
807
+ quoted: message
808
+ })
606
809
  ```
607
810
 
608
811
  ---
609
812
 
610
813
  ## 💳 Sending Payment Messages
611
814
 
612
- ```javascript
613
- // Invite payment
614
- sock.sendMessage(jid, { paymentInviteServiceType: 3 }) // 1, 2, atau 3
815
+ Payment-related structures are exposed through the corresponding message types.
615
816
 
616
- // Order
817
+ ### ➕ Invite Payment
818
+
819
+ ```js
617
820
  sock.sendMessage(jid, {
618
- orderText: '🛍️ Pesanan Kamu',
619
- thumbnail: fs.readFileSync('./thumbnail.jpg')
620
- }, { quoted: message })
821
+ paymentInviteMessage: {
822
+ serviceType: 3,
823
+ expiryTimestamp: Math.floor(Date.now() / 1000) + 86400
824
+ }
825
+ }, {
826
+ quoted: message
827
+ })
828
+ ```
829
+
830
+ ### 🧾 Invoice
831
+
832
+ Invoice support depends on the currently supported WhatsApp message schema.
621
833
 
622
- // Request payment
834
+ ### 🛍️ Order
835
+
836
+ ```js
623
837
  sock.sendMessage(jid, {
624
- text: '💳 Minta Pembayaran',
625
- requestPaymentFrom: '0@s.whatsapp.net'
838
+ orderMessage: {
839
+ orderId: 'ORDER_ID',
840
+ itemCount: 1,
841
+ status: 1,
842
+ surface: 1,
843
+ message: 'Casileys Order',
844
+ orderTitle: 'Example Product',
845
+ sellerJid: '0@s.whatsapp.net',
846
+ token: 'ORDER_TOKEN'
847
+ }
848
+ }, {
849
+ quoted: message
850
+ })
851
+ ```
852
+
853
+ ### 💳 Request Payment
854
+
855
+ ```js
856
+ sock.sendMessage(jid, {
857
+ requestPaymentMessage: {
858
+ currencyCodeIso4217: 'IDR',
859
+ amount1000: 1000000,
860
+ noteMessage: {
861
+ extendedTextMessage: {
862
+ text: 'Payment request'
863
+ }
864
+ }
865
+ }
866
+ }, {
867
+ quoted: message
626
868
  })
627
869
  ```
628
870
 
@@ -630,217 +872,535 @@ sock.sendMessage(jid, {
630
872
 
631
873
  ## 👁️ Other Message Options
632
874
 
633
- | Flag | Keterangan |
634
- |---|---|
635
- | `ai: true` | Tambah ikon AI (private chat only) |
636
- | `ephemeral: true` | Wrap ke `ephemeralMessage` |
637
- | `viewOnce: true` | View once (V1) |
638
- | `viewOnceV2: true` | View once (V2) |
639
- | `spoiler: true` | Wrap ke `spoilerMessage` |
640
- | `groupStatus: true` | Group status (grup only) |
641
- | `isLottie: true` | Lottie sticker |
642
- | `mentionAll: true` | Mention semua member grup |
643
- | `interactiveAsTemplate: true` | Wrap interactive ke template |
644
- | `raw: true` | Kirim struktur proto manual |
645
-
646
- ```javascript
647
- // Contoh: view once + spoiler
648
- sock.sendMessage(jid, {
649
- image: { url: './image.jpg' },
650
- caption: '👁️ Lihat sekali aja!',
651
- viewOnceV2: true
652
- }, { quoted: message })
653
-
654
- // External Ad Reply
655
- sock.sendMessage(jid, {
656
- text: '📰 Info Penting!',
875
+ ### 🤖 AI Icon
876
+
877
+ ```js
878
+ sock.sendMessage(jid, {
879
+ text: 'Casileys',
880
+ ai: true
881
+ })
882
+ ```
883
+
884
+ ### 🕒 Ephemeral
885
+
886
+ ```js
887
+ sock.sendMessage(jid, {
888
+ ephemeral: true,
889
+ text: 'Ephemeral message'
890
+ })
891
+ ```
892
+
893
+ ### 📰 External Ad Reply
894
+
895
+ ```js
896
+ sock.sendMessage(jid, {
897
+ text: 'Check this out.',
657
898
  externalAdReply: {
658
- title: '📝 Tahukah kamu?',
659
- body: 'Fakta menarik hari ini',
899
+ title: 'Casileys',
900
+ body: 'WhatsApp Web API',
660
901
  thumbnail: fs.readFileSync('./thumbnail.jpg'),
661
- largeThumbnail: false,
662
- url: 'https://www.npmjs.com/package/@kaels/casileys'
902
+ mediaType: 1,
903
+ renderLargerThumbnail: true,
904
+ sourceUrl: 'YOUR_SOURCE_URL'
663
905
  }
664
- }, { quoted: message })
906
+ })
907
+ ```
908
+
909
+ ### 📑 Spoiler
910
+
911
+ ```js
912
+ sock.sendMessage(jid, {
913
+ spoiler: true,
914
+ text: 'Spoiler message'
915
+ })
916
+ ```
917
+
918
+ ### 👁️ View Once
919
+
920
+ ```js
921
+ sock.sendMessage(jid, {
922
+ viewOnce: true,
923
+ image: {
924
+ url: './path/to/image.jpg'
925
+ }
926
+ })
927
+ ```
928
+
929
+ ### 👁️ View Once V2
930
+
931
+ ```js
932
+ sock.sendMessage(jid, {
933
+ viewOnceV2: true,
934
+ video: {
935
+ url: './path/to/video.mp4'
936
+ }
937
+ })
938
+ ```
939
+
940
+ ### 👁️ View Once V2 Extension
941
+
942
+ ```js
943
+ sock.sendMessage(jid, {
944
+ viewOnceV2Extension: true,
945
+ image: {
946
+ url: './path/to/image.jpg'
947
+ }
948
+ })
949
+ ```
950
+
951
+ ### 🐱 Lottie Sticker
952
+
953
+ ```js
954
+ sock.sendMessage(jid, {
955
+ sticker: {
956
+ url: './path/to/animation.webp'
957
+ },
958
+ isLottie: true
959
+ })
960
+ ```
961
+
962
+ ### 🏷️ Secure Meta Service Label
963
+
964
+ ```js
965
+ sock.sendMessage(jid, {
966
+ text: 'Casileys',
967
+ secureMetaServiceLabel: true
968
+ })
969
+ ```
970
+
971
+ ### 🧩 Raw
972
+
973
+ ```js
974
+ sock.sendMessage(jid, {
975
+ raw: {
976
+ message: {
977
+ conversation: 'Raw message'
978
+ }
979
+ }
980
+ })
665
981
  ```
666
982
 
667
983
  ---
668
984
 
985
+ ## 🧑‍🧑‍🧒 Group Status
986
+
987
+ Casileys adds a dedicated helper for publishing group status content.
988
+
989
+ **Direct message option**
990
+
991
+ ```js
992
+ sock.sendMessage(jid, {
993
+ groupStatus: true,
994
+ image: {
995
+ url: './path/to/image.jpg'
996
+ },
997
+ caption: 'Group Status'
998
+ })
999
+ ```
1000
+
1001
+ **Helper API**
1002
+
1003
+ ```js
1004
+ import {
1005
+ sendGroupStatusText,
1006
+ sendGroupStatusImage,
1007
+ sendGroupStatusVideo,
1008
+ sendGroupStatusAudio,
1009
+ sendGroupStatusSticker
1010
+ } from '@kaels/casileys'
1011
+ ```
1012
+
1013
+ **Text**
1014
+
1015
+ ```js
1016
+ await sendGroupStatusText(
1017
+ sock,
1018
+ '120000000000000000@g.us',
1019
+ 'Hello from Casileys'
1020
+ )
1021
+ ```
1022
+
1023
+ **Image**
1024
+
1025
+ ```js
1026
+ import fs from 'fs'
1027
+
1028
+ await sendGroupStatusImage(
1029
+ sock,
1030
+ '120000000000000000@g.us',
1031
+ fs.readFileSync('./image.jpg'),
1032
+ {
1033
+ caption: 'Casileys Group Status'
1034
+ }
1035
+ )
1036
+ ```
1037
+
1038
+ **Video**
1039
+
1040
+ ```js
1041
+ import fs from 'fs'
1042
+
1043
+ await sendGroupStatusVideo(
1044
+ sock,
1045
+ '120000000000000000@g.us',
1046
+ fs.readFileSync('./video.mp4'),
1047
+ {
1048
+ caption: 'Casileys Group Status'
1049
+ }
1050
+ )
1051
+ ```
1052
+
1053
+ **Audio**
1054
+
1055
+ ```js
1056
+ import fs from 'fs'
1057
+
1058
+ await sendGroupStatusAudio(
1059
+ sock,
1060
+ '120000000000000000@g.us',
1061
+ fs.readFileSync('./audio.ogg'),
1062
+ {
1063
+ mimetype: 'audio/ogg; codecs=opus',
1064
+ ptt: true
1065
+ }
1066
+ )
1067
+ ```
1068
+
1069
+ **Sticker**
1070
+
1071
+ ```js
1072
+ import fs from 'fs'
1073
+
1074
+ await sendGroupStatusSticker(
1075
+ sock,
1076
+ '120000000000000000@g.us',
1077
+ fs.readFileSync('./sticker.webp'),
1078
+ {
1079
+ caption: 'Casileys Group Status'
1080
+ }
1081
+ )
1082
+ ```
1083
+
1084
+ **WebP support**
1085
+
1086
+ The helper can process WebP sticker input:
1087
+
1088
+ | Input | Result |
1089
+ |---|---|
1090
+ | Static WebP | Image |
1091
+ | Animated WebP | Video |
1092
+ | JPEG / PNG | Image |
1093
+ | MP4 | Video |
1094
+ | OGG / Opus | Audio |
1095
+ | Text | Text |
1096
+
1097
+ Animated WebP conversion uses FFmpeg.
1098
+
1099
+ ---
1100
+
669
1101
  ## ♻️ Modify Messages
670
1102
 
671
- ```javascript
672
- // Hapus pesan
673
- sock.sendMessage(jid, { delete: message.key })
1103
+ ### 🗑️ Delete
1104
+
1105
+ ```js
1106
+ sock.sendMessage(jid, {
1107
+ delete: message.key
1108
+ })
1109
+ ```
674
1110
 
675
- // Edit teks
676
- sock.sendMessage(jid, { text: '✏️ Teks yang sudah diedit', edit: message.key })
1111
+ ### ✏️ Edit
677
1112
 
678
- // Edit caption media
679
- sock.sendMessage(jid, { caption: '✏️ Caption baru', edit: message.key })
1113
+ ```js
1114
+ sock.sendMessage(jid, {
1115
+ text: 'Edited message'
1116
+ }, {
1117
+ edit: message.key
1118
+ })
680
1119
  ```
681
1120
 
682
1121
  ---
683
1122
 
684
1123
  ## 🧰 Additional Contents
685
1124
 
686
- ### 🏷️ Find User ID (JID | PN / LID)
1125
+ ### 🏷️ Find User ID
687
1126
 
688
- > [!NOTE]
689
- > ID harus berupa angka saja (tanpa +, (), atau -) dan menyertakan kode negara.
1127
+ ```js
1128
+ const result = await sock.onWhatsApp(
1129
+ '628123456789'
1130
+ )
690
1131
 
691
- ```javascript
692
- const ids = await sock.findUserId('6281111111111@s.whatsapp.net')
693
- console.log(ids)
694
- // Output: { phoneNumber: '6281111111111@s.whatsapp.net', lid: '43411111111111@lid' }
1132
+ console.log(result)
695
1133
  ```
696
1134
 
697
1135
  ### 🔑 Request Custom Pairing Code
698
1136
 
699
- ```javascript
700
- const code = await sock.requestPairingCode('6281111111111', 'KAELZBASE')
701
- console.log('🔗 Pairing code:', code)
1137
+ ```js
1138
+ const code = await sock.requestPairingCode(
1139
+ '628123456789'
1140
+ )
1141
+
1142
+ console.log(code)
702
1143
  ```
703
1144
 
704
1145
  ### 🖼️ Image Processing
705
1146
 
706
- > [!NOTE]
707
- > Otomatis menggunakan library yang tersedia: `sharp`, `@napi-rs/image`, atau `jimp`.
1147
+ ```js
1148
+ const imageLibrary =
1149
+ await getImageProcessingLibrary()
1150
+
1151
+ console.log(imageLibrary)
1152
+ ```
1153
+
1154
+ ---
1155
+
1156
+ ## 📣 Newsletter Management
1157
+
1158
+ Newsletter JIDs use:
1159
+
1160
+ ```
1161
+ 123456789012345678@newsletter
1162
+ ```
1163
+
1164
+ Example:
1165
+
1166
+ ```js
1167
+ const newsletterJid =
1168
+ '123456789012345678@newsletter'
1169
+
1170
+ await sock.sendMessage(
1171
+ newsletterJid,
1172
+ {
1173
+ text: 'Hello from Casileys'
1174
+ }
1175
+ )
1176
+ ```
1177
+
1178
+ Newsletter media and message operations use the same socket/message infrastructure.
1179
+
1180
+ ---
1181
+
1182
+ ## 👥 Group Management
1183
+
1184
+ **Fetch groups**
1185
+
1186
+ ```js
1187
+ const groups =
1188
+ await sock.groupFetchAllParticipating()
1189
+
1190
+ console.log(groups)
1191
+ ```
1192
+
1193
+ **Create group**
1194
+
1195
+ ```js
1196
+ const group =
1197
+ await sock.groupCreate(
1198
+ 'Casileys Community',
1199
+ [
1200
+ '628123456789@s.whatsapp.net'
1201
+ ]
1202
+ )
1203
+
1204
+ console.log(group)
1205
+ ```
1206
+
1207
+ **Update participants**
1208
+
1209
+ ```js
1210
+ await sock.groupParticipantsUpdate(
1211
+ '120000000000000000@g.us',
1212
+ [
1213
+ '628123456789@s.whatsapp.net'
1214
+ ],
1215
+ 'add'
1216
+ )
1217
+ ```
1218
+
1219
+ The participant action can be changed to:
708
1220
 
709
- ```javascript
710
- import { getImageProcessingLibrary } from '@kaels/casileys'
1221
+ | Action | Description |
1222
+ |---|---|
1223
+ | `add` | Add a participant to the group |
1224
+ | `remove` | Remove a participant from the group |
1225
+ | `promote` | Promote a participant to admin |
1226
+ | `demote` | Demote a participant from admin |
1227
+
1228
+ **Update subject**
1229
+
1230
+ ```js
1231
+ await sock.groupUpdateSubject(
1232
+ '120000000000000000@g.us',
1233
+ 'Casileys Community'
1234
+ )
1235
+ ```
1236
+
1237
+ **Update description**
1238
+
1239
+ ```js
1240
+ await sock.groupUpdateDescription(
1241
+ '120000000000000000@g.us',
1242
+ 'Community powered by Casileys.'
1243
+ )
1244
+ ```
1245
+
1246
+ **Leave**
1247
+
1248
+ ```js
1249
+ await sock.groupLeave(
1250
+ '120000000000000000@g.us'
1251
+ )
1252
+ ```
1253
+
1254
+ ---
1255
+
1256
+ ## 👥 Community Management
1257
+
1258
+ Community-related operations use the group/community methods provided by the socket and WhatsApp protocol.
1259
+
1260
+ ---
1261
+
1262
+ ## 👤 Profile Management
1263
+
1264
+ **Profile picture**
1265
+
1266
+ ```js
1267
+ const profilePicture =
1268
+ await sock.profilePictureUrl(
1269
+ '628123456789@s.whatsapp.net',
1270
+ 'image'
1271
+ )
1272
+
1273
+ console.log(profilePicture)
1274
+ ```
1275
+
1276
+ **Update profile picture**
1277
+
1278
+ ```js
1279
+ await sock.updateProfilePicture(
1280
+ sock.user.id,
1281
+ {
1282
+ url: './profile.jpg'
1283
+ }
1284
+ )
1285
+ ```
711
1286
 
712
- const lib = await getImageProcessingLibrary()
1287
+ **Update profile status**
713
1288
 
714
- // Jika sharp tersedia
715
- if (lib.sharp?.default) {
716
- const output = await lib.sharp.default('./image.jpg')
717
- .resize(512)
718
- .jpeg({ quality: 80 })
719
- .toBuffer()
1289
+ ```js
1290
+ await sock.updateProfileStatus(
1291
+ 'Powered by Casileys'
1292
+ )
1293
+ ```
1294
+
1295
+ ---
1296
+
1297
+ ## 🛒 Business Management
1298
+
1299
+ Business messages can be sent through the same message API.
1300
+
1301
+ Product structures can contain fields such as:
1302
+
1303
+ ```js
1304
+ {
1305
+ currencyCode: 'IDR',
1306
+ priceAmount1000: 1000000,
1307
+ productId: 'product-id',
1308
+ productImageCount: 1,
1309
+ title: 'Casileys Product',
1310
+ description: 'Product description',
1311
+ url: 'YOUR_PRODUCT_URL'
720
1312
  }
721
1313
  ```
722
1314
 
723
- ### 👥 Group Management
724
-
725
- ```javascript
726
- // Buat grup
727
- const group = await sock.groupCreate('Nama Grup', ['628xxx@s.whatsapp.net'])
728
-
729
- // Metadata
730
- const metadata = await sock.groupMetadata(jid)
731
-
732
- // Kelola member
733
- sock.groupParticipantsUpdate(jid, ['628xxx@s.whatsapp.net'], 'add') // tambah
734
- sock.groupParticipantsUpdate(jid, ['628xxx@s.whatsapp.net'], 'remove') // kick
735
- sock.groupParticipantsUpdate(jid, ['628xxx@s.whatsapp.net'], 'promote') // jadikan admin
736
- sock.groupParticipantsUpdate(jid, ['628xxx@s.whatsapp.net'], 'demote') // copot admin
737
-
738
- // Setting grup
739
- sock.groupSettingUpdate(jid, 'announcement') // hanya admin bisa chat
740
- sock.groupSettingUpdate(jid, 'not_announcement') // semua bisa chat
741
- sock.groupSettingUpdate(jid, 'locked') // hanya admin edit info
742
- sock.groupSettingUpdate(jid, 'unlocked') // semua bisa edit info
743
- sock.groupToggleEphemeral(jid, 86400) // aktifkan pesan sementara
744
- sock.groupJoinApprovalMode(jid, 'on') // aktifkan persetujuan member
745
-
746
- // Invite
747
- const inviteCode = await sock.groupInviteCode(jid)
748
- sock.groupRevokeInvite(jid)
749
- sock.groupAcceptInvite(inviteCode)
750
- sock.groupLeave(jid)
751
- ```
752
-
753
- ### 👥 Community Management
754
-
755
- ```javascript
756
- const community = await sock.communityCreate('Nama Komunitas', 'Deskripsi')
757
- const group = await sock.communityCreateGroup('Announcements', ['628xxx@s.whatsapp.net'], communityJid)
758
-
759
- sock.communityLinkGroup(groupJid, communityJid)
760
- sock.communityUnlinkGroup(groupJid, communityJid)
761
- sock.communityLeave(jid)
762
- ```
763
-
764
- ### 👤 Profile Management
765
-
766
- ```javascript
767
- sock.updateProfilePicture(jid, { url: './photo.jpg' })
768
- sock.removeProfilePicture(jid)
769
- sock.updateProfileName('Nama Baru')
770
- sock.updateProfileStatus('Status baru')
771
- sock.sendPresenceUpdate('available', jid)
772
- sock.readMessages([message.key])
773
- sock.updateBlockStatus(jid, 'block') // blokir
774
- sock.updateBlockStatus(jid, 'unblock') // buka blokir
775
- ```
776
-
777
- ### 🔐 Privacy Management
778
-
779
- ```javascript
780
- sock.updateLastSeenPrivacy('all') // semua bisa lihat
781
- sock.updateLastSeenPrivacy('contacts') // kontak saja
782
- sock.updateLastSeenPrivacy('nobody') // tidak ada
783
- sock.updateOnlinePrivacy('all')
784
- sock.updateProfilePicturePrivacy('contacts')
785
- sock.updateReadReceiptsPrivacy('all')
786
- sock.updateReadReceiptsPrivacy('none')
787
- sock.updateCallPrivacy('everyone')
788
- sock.updateDefaultDisappearingMode(86400)
789
- ```
790
-
791
- ### 📣 Newsletter Management
792
-
793
- ```javascript
794
- sock.newsletterCreate('Nama Channel', 'Deskripsi')
795
- sock.newsletterFollow('jid@newsletter')
796
- sock.newsletterUnfollow('jid@newsletter')
797
- sock.newsletterMute('jid@newsletter')
798
- sock.newsletterUnmute('jid@newsletter')
799
- sock.newsletterUpdateName('jid@newsletter', 'Nama Baru')
800
- sock.newsletterUpdateDescription('jid@newsletter', 'Deskripsi baru')
801
- sock.newsletterReactMessage('jid@newsletter', '100', '💛')
802
- sock.newsletterDelete('jid@newsletter')
803
- ```
804
-
805
- ### 📡 Events
806
-
807
- ```javascript
808
- sock.ev.on('connection.update', (update) => {})
809
- sock.ev.on('creds.update', (update) => {})
810
- sock.ev.on('messages.upsert', (update) => {})
811
- sock.ev.on('messages.update', (update) => {})
812
- sock.ev.on('messages.delete', (update) => {})
813
- sock.ev.on('messages.reaction', (update) => {})
814
- sock.ev.on('groups.upsert', (update) => {})
815
- sock.ev.on('groups.update', (update) => {})
816
- sock.ev.on('group-participants.update', (update) => {})
817
- sock.ev.on('contacts.upsert', (update) => {})
818
- sock.ev.on('contacts.update', (update) => {})
819
- sock.ev.on('chats.upsert', (update) => {})
820
- sock.ev.on('chats.update', (update) => {})
821
- sock.ev.on('presence.update', (update) => {})
822
- sock.ev.on('blocklist.set', (update) => {})
823
- sock.ev.on('blocklist.update', (update) => {})
824
- sock.ev.on('call', (update) => {})
825
- sock.ev.on('newsletter.reaction', (update) => {})
826
- sock.ev.on('newsletter.view', (update) => {})
827
- sock.ev.on('settings.update', (update) => {})
1315
+ ---
1316
+
1317
+ ## 🔐 Privacy Management
1318
+
1319
+ ```js
1320
+ const privacy =
1321
+ await sock.fetchPrivacySettings()
1322
+
1323
+ console.log(privacy)
828
1324
  ```
829
1325
 
830
1326
  ---
831
1327
 
1328
+ ## 📡 Events
1329
+
1330
+ Casileys exposes WhatsApp events through `sock.ev`.
1331
+
1332
+ **Messages**
1333
+
1334
+ ```js
1335
+ sock.ev.on('messages.upsert', async ({ messages }) => {
1336
+ for (const message of messages) {
1337
+ if (!message.message) continue
1338
+
1339
+ console.log(message)
1340
+ }
1341
+ })
1342
+ ```
1343
+
1344
+ **Connection**
1345
+
1346
+ ```js
1347
+ sock.ev.on('connection.update', (update) => {
1348
+ const {
1349
+ connection,
1350
+ lastDisconnect
1351
+ } = update
1352
+
1353
+ console.log({
1354
+ connection,
1355
+ lastDisconnect
1356
+ })
1357
+ })
1358
+ ```
1359
+
1360
+ **Credentials**
1361
+
1362
+ ```js
1363
+ sock.ev.on('creds.update', saveCreds)
1364
+ ```
1365
+
1366
+ ---
1367
+
1368
+ ## ⚠️ Disclaimer
1369
+
1370
+ Casileys is an independent fork based on existing Baileys-related projects.
1371
+
1372
+ It is not affiliated with WhatsApp or Meta Platforms, Inc.
1373
+
1374
+ The project retains appropriate attribution to its upstream projects and contributors.
1375
+
1376
+ Fork reference: `https://github.com/itsliaa/baileys`
1377
+
1378
+ Please respect the licenses and attribution requirements of the upstream projects when using or redistributing Casileys.
1379
+
1380
+ ---
1381
+
832
1382
  ## 📣 Credits
833
1383
 
834
- Kredit penuh diberikan kepada para maintainer dan kontributor asli Baileys:
1384
+ **Upstream**
1385
+
1386
+ - WhiskeySockets / Baileys
1387
+ - Original Baileys maintainers and contributors
1388
+ - Contributors to the WhatsApp protocol ecosystem
1389
+
1390
+ **Fork Base**
1391
+
1392
+ - ItsLiaaa / Baileys
1393
+ - Contributors to the fork base
1394
+
1395
+ **Casileys**
1396
+
1397
+ - Casileys contributors and maintainers
1398
+ - Contributors to Casileys-specific improvements and utilities
1399
+
1400
+ ---
835
1401
 
836
- - [purpshell](https://github.com/purpshell)
837
- - [jlucaso1](https://github.com/jlucaso1)
838
- - [adiwajshing](https://github.com/adiwajshing)
1402
+ ## 📄 License
839
1403
 
840
- Terima kasih khusus kepada:
841
- - **[itsliaaa](https://github.com/itsliaaa)** — atas fork [`@itsliaaa/baileys`](https://www.npmjs.com/package/@itsliaaa/baileys) yang menjadi fondasi awal package ini. Maaf atas kurangnya atribusi sebelumnya.
842
- - **[itsreimau](https://github.com/itsreimau)** — atas perbaikan implementasi `updateBlockStatus`.
843
- - **[WhiskeySockets/Baileys](https://github.com/WhiskeySockets/Baileys)** — upstream library yang menjadi dasar dari semuanya.
1404
+ Casileys is released under the MIT License.
844
1405
 
845
- > [!CAUTION]
846
- > ⚠️ Modifikasi, penghapusan, atau kesalahan representasi kredit ini dilarang keras. Setiap redistribusi atau fork harus mempertahankan bagian ini dalam bentuk aslinya.
1406
+ See [`LICENSE`](./LICENSE) for the complete license text.