@fvckerss/baileys 1.0.3 → 1.0.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.
- package/README.md +172 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,7 +36,6 @@ Baileys ini modifan dari baileys @whiskeysockets/baileys
|
|
|
36
36
|
- Forward Message
|
|
37
37
|
- Read Receipt
|
|
38
38
|
- Presence Update
|
|
39
|
-
- Rich Response Message
|
|
40
39
|
- AI Rich Response Message
|
|
41
40
|
- Full WhatsApp Web Protocol Access
|
|
42
41
|
|
|
@@ -198,16 +197,120 @@ END:VCARD`
|
|
|
198
197
|
|
|
199
198
|
---
|
|
200
199
|
|
|
200
|
+
### ✨ Rich Code block
|
|
201
|
+
|
|
202
|
+
```
|
|
203
|
+
const {
|
|
204
|
+
prepareRichResponseMessage,
|
|
205
|
+
generateWAMessageFromContent
|
|
206
|
+
} = require("@fvckerss/baileys")
|
|
207
|
+
|
|
208
|
+
const rich = prepareRichResponseMessage({
|
|
209
|
+
headerText: "JavaScript Example",
|
|
210
|
+
|
|
211
|
+
contentText:
|
|
212
|
+
"Berikut contoh code sederhana",
|
|
213
|
+
|
|
214
|
+
code: `
|
|
215
|
+
async function hello() {
|
|
216
|
+
console.log("Hello World")
|
|
217
|
+
}
|
|
218
|
+
`,
|
|
219
|
+
|
|
220
|
+
language: "javascript",
|
|
221
|
+
|
|
222
|
+
footerText: "Generated by Fvckers"
|
|
223
|
+
})
|
|
224
|
+
|
|
225
|
+
const msg = generateWAMessageFromContent(
|
|
226
|
+
jid,
|
|
227
|
+
rich,
|
|
228
|
+
{}
|
|
229
|
+
)
|
|
230
|
+
|
|
231
|
+
await conn.relayMessage(
|
|
232
|
+
jid,
|
|
233
|
+
msg.message,
|
|
234
|
+
{
|
|
235
|
+
messageId: msg.key.id
|
|
236
|
+
}
|
|
237
|
+
)
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
### ✨ Rich Table
|
|
243
|
+
|
|
244
|
+
```
|
|
245
|
+
const {
|
|
246
|
+
prepareRichResponseMessage,
|
|
247
|
+
generateWAMessageFromContent
|
|
248
|
+
} = require("@fvckerss/baileys")
|
|
249
|
+
|
|
250
|
+
const rich = prepareRichResponseMessage({
|
|
251
|
+
headerText: "Package Info",
|
|
252
|
+
|
|
253
|
+
contentText: "Data package:",
|
|
254
|
+
|
|
255
|
+
table: [
|
|
256
|
+
["Package", "Version"],
|
|
257
|
+
["Baileys", "7.0.0"],
|
|
258
|
+
["Express", "5.1.0"],
|
|
259
|
+
["Axios", "1.11.0"]
|
|
260
|
+
]
|
|
261
|
+
})
|
|
262
|
+
|
|
263
|
+
const msg = generateWAMessageFromContent(
|
|
264
|
+
jid,
|
|
265
|
+
rich,
|
|
266
|
+
{}
|
|
267
|
+
)
|
|
268
|
+
|
|
269
|
+
await sock.relayMessage(
|
|
270
|
+
jid,
|
|
271
|
+
msg.message,
|
|
272
|
+
{
|
|
273
|
+
messageId: msg.key.id
|
|
274
|
+
}
|
|
275
|
+
)
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
### ✨ Rich Inline Entites
|
|
281
|
+
|
|
282
|
+
```
|
|
283
|
+
const { prepareRichResponseMessage } = require("@fvckerss/baileys")
|
|
284
|
+
|
|
285
|
+
const msg = prepareRichResponseMessage({
|
|
286
|
+
disclaimerText: 'Inline Entities',
|
|
287
|
+
headerText: '## Check!',
|
|
288
|
+
contentText: '---',
|
|
289
|
+
links: [
|
|
290
|
+
{
|
|
291
|
+
text: `Website`,
|
|
292
|
+
title: " Portofolio",
|
|
293
|
+
url: "https://swiper.my.id"
|
|
294
|
+
}
|
|
295
|
+
],
|
|
296
|
+
footerText: '---'
|
|
297
|
+
})
|
|
298
|
+
|
|
299
|
+
await conn.relayMessage(m.chat, msg, {})
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
201
304
|
### 📋 List Message
|
|
202
305
|
|
|
203
306
|
```
|
|
204
|
-
await
|
|
205
|
-
text: "
|
|
307
|
+
await sock.sendMessage(jid, {
|
|
308
|
+
text: "Hello World",
|
|
206
309
|
footer: "FVCKERS",
|
|
207
310
|
buttons: [
|
|
208
311
|
{
|
|
209
|
-
buttonId: "
|
|
210
|
-
buttonText: { displayText: "
|
|
312
|
+
buttonId: "single_select",
|
|
313
|
+
buttonText: { displayText: "Select Menu" },
|
|
211
314
|
type: 1,
|
|
212
315
|
nativeFlowInfo: {
|
|
213
316
|
name: "single_select",
|
|
@@ -220,7 +323,45 @@ await conn.sendMessage(m.chat, {
|
|
|
220
323
|
{
|
|
221
324
|
title: `Button`,
|
|
222
325
|
description: `> Ini tampilan button`,
|
|
223
|
-
id:
|
|
326
|
+
id: `.listb`
|
|
327
|
+
}
|
|
328
|
+
]
|
|
329
|
+
}
|
|
330
|
+
]
|
|
331
|
+
})
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
],
|
|
335
|
+
headerType: 1
|
|
336
|
+
});
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
### 📋 List Message With Thumbnail
|
|
342
|
+
|
|
343
|
+
```
|
|
344
|
+
await sock.sendMessage(jid, {
|
|
345
|
+
image: { url: "https://upload.fvckers.my.id/y1z56qmqj90wv8.jpg" },
|
|
346
|
+
text: "Hello World",
|
|
347
|
+
footer: "FVCKERS",
|
|
348
|
+
buttons: [
|
|
349
|
+
{
|
|
350
|
+
buttonId: "single_select",
|
|
351
|
+
buttonText: { displayText: "Select Menu" },
|
|
352
|
+
type: 1,
|
|
353
|
+
nativeFlowInfo: {
|
|
354
|
+
name: "single_select",
|
|
355
|
+
paramsJson: JSON.stringify({
|
|
356
|
+
title: "List Group",
|
|
357
|
+
sections: [
|
|
358
|
+
{
|
|
359
|
+
title: "Group",
|
|
360
|
+
rows: [
|
|
361
|
+
{
|
|
362
|
+
title: `Button`,
|
|
363
|
+
description: `> Ini tampilan button`,
|
|
364
|
+
id: `.listb`
|
|
224
365
|
}
|
|
225
366
|
]
|
|
226
367
|
}
|
|
@@ -259,6 +400,31 @@ await sock.sendMessage(jid, {
|
|
|
259
400
|
|
|
260
401
|
---
|
|
261
402
|
|
|
403
|
+
### 🔘 Buttons Message With Thumbnail
|
|
404
|
+
|
|
405
|
+
```
|
|
406
|
+
await sock.sendMessage(jid, {
|
|
407
|
+
image: { url: "https://upload.fvckers.my.id/y1z56qmqj90wv8.jpg" },
|
|
408
|
+
text: "Hello World",
|
|
409
|
+
buttons: [
|
|
410
|
+
{
|
|
411
|
+
buttonId: ".menu",
|
|
412
|
+
buttonText: {
|
|
413
|
+
displayText: "Menu"
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
buttonId: ".owner",
|
|
418
|
+
buttonText: {
|
|
419
|
+
displayText: "Owner"
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
]
|
|
423
|
+
})
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
---
|
|
427
|
+
|
|
262
428
|
### ⚡ InteractiveMessage NativeFlowMessage With Thumbnail
|
|
263
429
|
|
|
264
430
|
```
|