@fvckerss/baileys 1.0.20 → 1.0.21

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 (2) hide show
  1. package/README.md +565 -228
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
- <h1 align='center'><img alt="Baileys logo" src="https://upload.fvckers.my.id/jsezegmrak03cc.jpg" height="200"/></h1>
1
+ <h1 align="center">
2
+ <img alt="Baileys logo" src="https://upload.fvckers.my.id/jsezegmrak03cc.jpg" height="200"/>
3
+ </h1>
2
4
 
3
- ----
5
+ ---
4
6
 
5
7
  ### 📱 Baileys
6
8
 
@@ -8,7 +10,7 @@ Baileys adalah library WhatsApp Web API untuk Node.js yang memungkinkan develope
8
10
 
9
11
  Library ini bekerja langsung menggunakan protokol WhatsApp Web sehingga lebih ringan dibanding solusi berbasis browser seperti Puppeteer.
10
12
 
11
- Baileys ini modifan dari baileys @whiskeysockets/baileys
13
+ Baileys ini modifan dari Baileys "@whiskeysockets/baileys".
12
14
 
13
15
  ---
14
16
 
@@ -43,7 +45,13 @@ Baileys ini modifan dari baileys @whiskeysockets/baileys
43
45
 
44
46
  ### 📦 Installation
45
47
 
48
+ ```
49
+ npm install @fvckerss/baileys@latest
50
+
51
+ or
52
+
46
53
  npm install @fvckerss/baileys
54
+ ```
47
55
 
48
56
  ---
49
57
 
@@ -51,29 +59,31 @@ npm install @fvckerss/baileys
51
59
 
52
60
  ```
53
61
  const {
54
- default: makeWASocket,
55
- useMultiFileAuthState,
56
- DisconnectReason
57
- } = require("@fvckerss/baileys")
62
+ default: makeWASocket,
63
+ useMultiFileAuthState,
64
+ DisconnectReason
65
+ } = require("@fvckerss/baileys");
58
66
 
59
67
  async function startBot() {
60
- const { state, saveCreds } =
61
- await useMultiFileAuthState("./session")
68
+ const { state, saveCreds } =
69
+ await useMultiFileAuthState("./session");
62
70
 
63
- const sock = makeWASocket({
64
- auth: state
65
- })
71
+ const sock = makeWASocket({
72
+ auth: state
73
+ });
66
74
 
67
- sock.ev.on("creds.update", saveCreds)
75
+ sock.ev.on("creds.update", saveCreds);
68
76
 
69
- sock.ev.on("connection.update", ({ connection }) => {
70
- if (connection === "open") {
71
- console.log("Bot Connected")
72
- }
73
- })
77
+ sock.ev.on("connection.update", ({ connection }) => {
78
+ if (connection === "open") {
79
+ console.log("Bot Connected");
80
+ }
81
+ });
82
+
83
+ return sock;
74
84
  }
75
85
 
76
- startBot()
86
+ startBot();
77
87
  ```
78
88
 
79
89
  ---
@@ -81,12 +91,9 @@ startBot()
81
91
  ### 💬 Send Text Message
82
92
 
83
93
  ```
84
- await sock.sendMessage(
85
- jid,
86
- {
94
+ await sock.sendMessage(jid, {
87
95
  text: "Halo Dunia!"
88
- }
89
- )
96
+ });
90
97
  ```
91
98
 
92
99
  ---
@@ -94,15 +101,12 @@ await sock.sendMessage(
94
101
  ### 🖼️ Send Image
95
102
 
96
103
  ```
97
- await sock.sendMessage(
98
- jid,
99
- {
104
+ await sock.sendMessage(jid, {
100
105
  image: {
101
- url: "./image.jpg"
106
+ url: "./image.jpg"
102
107
  },
103
108
  caption: "Hello"
104
- }
105
- )
109
+ });
106
110
  ```
107
111
 
108
112
  ---
@@ -110,15 +114,12 @@ await sock.sendMessage(
110
114
  ### 🎥 Send Video
111
115
 
112
116
  ```
113
- await sock.sendMessage(
114
- jid,
115
- {
117
+ await sock.sendMessage(jid, {
116
118
  video: {
117
- url: "./video.mp4"
119
+ url: "./video.mp4"
118
120
  },
119
121
  caption: "Video Test"
120
- }
121
- )
122
+ });
122
123
  ```
123
124
 
124
125
  ---
@@ -126,15 +127,12 @@ await sock.sendMessage(
126
127
  ### 🎵 Send Audio
127
128
 
128
129
  ```
129
- await sock.sendMessage(
130
- jid,
131
- {
130
+ await sock.sendMessage(jid, {
132
131
  audio: {
133
- url: "./audio.mp3"
132
+ url: "./audio.mp3"
134
133
  },
135
134
  mimetype: "audio/mpeg"
136
- }
137
- )
135
+ });
138
136
  ```
139
137
 
140
138
  ---
@@ -142,16 +140,13 @@ await sock.sendMessage(
142
140
  ### 📄 Send Document
143
141
 
144
142
  ```
145
- await sock.sendMessage(
146
- jid,
147
- {
143
+ await sock.sendMessage(jid, {
148
144
  document: {
149
- url: "./file.pdf"
145
+ url: "./file.pdf"
150
146
  },
151
147
  fileName: "README.pdf",
152
148
  mimetype: "application/pdf"
153
- }
154
- )
149
+ });
155
150
  ```
156
151
 
157
152
  ---
@@ -159,15 +154,12 @@ await sock.sendMessage(
159
154
  ### 📍 Send Location
160
155
 
161
156
  ```
162
- await sock.sendMessage(
163
- jid,
164
- {
157
+ await sock.sendMessage(jid, {
165
158
  location: {
166
- degreesLatitude: -6.732,
167
- degreesLongitude: 108.552
159
+ degreesLatitude: -6.732,
160
+ degreesLongitude: 108.552
168
161
  }
169
- }
170
- )
162
+ });
171
163
  ```
172
164
 
173
165
  ---
@@ -175,40 +167,157 @@ await sock.sendMessage(
175
167
  ### 👤 Send Contact
176
168
 
177
169
  ```
178
- await sock.sendMessage(
179
- jid,
180
- {
170
+ await sock.sendMessage(jid, {
181
171
  contacts: {
182
- displayName: "Swiper",
183
- contacts: [
184
- {
185
- vcard: `
172
+ displayName: "Swiper",
173
+ contacts: [
174
+ {
175
+ vcard: `
186
176
  BEGIN:VCARD
187
177
  VERSION:3.0
188
178
  FN:Swiper
189
179
  TEL;type=CELL:+628123456789
190
180
  END:VCARD`
191
- }
192
- ]
181
+ }
182
+ ]
193
183
  }
194
- }
195
- )
184
+ });
196
185
  ```
197
186
 
198
187
  ---
199
188
 
200
- ### ✨ Rich Product Card
189
+ ### ✨ Rich Inline Entities
201
190
 
202
191
  ```
203
- await sock.sendMessage(jid, {
204
- disclaimerText: "🚀 SWIPER FVCK",
192
+ await sock.sendAIRich(jid, {
193
+ headerText: "# Image Example",
194
+ contentText: "Ini adalah contoh AI Rich Image.",
195
+
196
+ links: [
197
+ {
198
+ text: "Website",
199
+ title: "Portofolio",
200
+ url: "https://swiper.my.id"
201
+ }
202
+ ],
203
+
204
+ suggested: [
205
+ "SWIPER FVCK",
206
+ "FVCKERS"
207
+ ],
208
+
209
+ footerText: "Generate By Fvckers AI"
210
+ });
211
+ ```
212
+
213
+ ---
214
+
215
+ ### 🖼️ AI Rich Image
216
+
217
+ ```
218
+ await sock.sendAIRich(jid, {
219
+ headerText: "# Image Example",
220
+ contentText: "Ini adalah contoh AI Rich Image.",
221
+
222
+ image: "https://c.termai.cc/i192/PXphkj.jpg",
223
+
224
+ suggested: [
225
+ "SWIPER FVCK",
226
+ "FVCKERS"
227
+ ],
228
+
229
+ footerText: "Generate By Fvckers AI"
230
+ });
231
+ ```
232
+
233
+ ---
234
+
235
+ ### 🎥 AI Rich Video
236
+
237
+ ```
238
+ await sock.sendAIRich(jid, {
239
+ headerText: "# Video Example",
240
+ contentText: "Ini adalah contoh AI Rich Video.",
241
+
242
+ video: "https://c.termai.cc/v145/FCZyDvC.mp4",
243
+
244
+ suggested: [
245
+ "SWIPER FVCK",
246
+ "FVCKERS"
247
+ ],
248
+
249
+ footerText: "Generate By Fvckers AI"
250
+ });
251
+ ```
252
+
253
+ ---
254
+
255
+ ### 💻 AI Rich Code
256
+
257
+ ```
258
+ await sock.sendAIRich(jid, {
259
+ headerText: "# JavaScript Example",
260
+ contentText: "Berikut contoh code JavaScript.",
261
+
262
+ code: `
263
+ console.log("Hello World");
264
+
265
+ const swiper = "Fvckers";
266
+ console.log(swiper);
267
+ `,
268
+
269
+ language: "javascript",
270
+
271
+ suggested: [
272
+ "SWIPER FVCK",
273
+ "FVCKERS"
274
+ ],
275
+
276
+ footerText: "Generate By Fvckers AI"
277
+ });
278
+ ```
279
+
280
+ ---
281
+
282
+ ### 📊 AI Rich Table
283
+
284
+ ```
285
+ await sock.sendAIRich(jid, {
286
+ headerText: "# Package Information",
287
+ contentText: "Daftar package yang digunakan.",
288
+
289
+ table: [
290
+ ["Package", "Version", "Status"],
291
+ ["Baileys", "7.0.0", "Ready"],
292
+ ["Express", "5.1.0", "Ready"],
293
+ ["Axios", "1.11.0", "Ready"]
294
+ ],
295
+
296
+ suggested: [
297
+ "SWIPER FVCK",
298
+ "FVCKERS"
299
+ ],
300
+
301
+ footerText: "Generate By Fvckers AI"
302
+ });
303
+ ```
304
+
305
+ ---
306
+
307
+ ### 🛍️ AI Rich Product
308
+
309
+ ```
310
+ await sock.sendAIRich(jid, {
311
+ headerText: "# Product Information",
312
+ contentText: "Produk unggulan FVCKERS.",
313
+
205
314
  product: [{
206
315
  title: "FVCKERS",
207
316
  brand: "Swiper Fvck",
208
317
  price: "Rp 999.999.999",
209
318
  sale_price: "Rp 666.666.666",
210
319
  product_url: "https://wa.me/6283895883216",
211
- image_url: "https://c.termai.cc/i116/Z6flN6.jpg",
320
+ image_url: "https://c.termai.cc/i192/PXphkj.jpg",
212
321
  icon_url: "https://static.nike.com/a/images/t_PDP_1280_v1/f_auto,q_auto:eco/additional_image_1.png"
213
322
  }],
214
323
 
@@ -217,68 +326,291 @@ await sock.sendMessage(jid, {
217
326
  "FVCKERS"
218
327
  ],
219
328
 
220
- footerText: 'Generate By Fvckers'
221
- }, {
222
- quoted: m
223
- })
329
+ footerText: "Generate By Fvckers AI"
330
+ });
224
331
  ```
225
332
 
226
333
  ---
227
334
 
228
- ### ✨ Rich Code Block
335
+ ### 📸 AI Rich Instagram Post
229
336
 
230
337
  ```
231
- await sock.sendMessage(jid, {
232
- headerText: "# JavaScript Example",
233
- contentText: "Berikut contoh code sederhana",
338
+ await sock.sendAIRich(jid, {
339
+ headerText: "# Instagram Post",
340
+ contentText: "Contoh tampilan postingan Instagram.",
341
+
342
+ post: {
343
+ title: "Postingan Menarik",
344
+ username: "@swiper_fvck",
345
+ profile_picture_url: "https://c.termai.cc/i192/PXphkj.jpg",
346
+ thumbnail_url: "https://c.termai.cc/i192/PXphkj.jpg",
347
+ caption: "Ini caption postingan.",
348
+ likes_count: 999,
349
+ post_url: "https://instagram.com/p/WjdGvsjw",
350
+ is_verified: true
351
+ },
234
352
 
235
- code: `
236
- async function hello() {
237
- console.log("Hello World")
238
- }
239
- `,
353
+ suggested: [
354
+ "SWIPER FVCK",
355
+ "FVCKERS"
356
+ ],
240
357
 
241
- language: "javascript",
242
- footerText: 'Generate By Fvckers'
243
- }, { quoted: m })
358
+ footerText: "Generate By Fvckers AI"
359
+ });
244
360
  ```
245
361
 
246
362
  ---
247
363
 
248
- ### ✨ Rich Table
364
+ ### 🎬 AI Rich Reels
249
365
 
250
366
  ```
251
- await sock.sendMessage(jid, {
252
- disclaimerText: "🚀 SWIPER FVCK",
253
- headerText: '## Package Info',
254
- contentText: "Data package:",
255
- table: [
256
- ["Package", "Version"],
257
- ["Baileys", "7.0.0"],
258
- ["Express", "5.1.0"],
259
- ["Axios", "1.11.0"]
260
- ],
261
- footerText: 'Generate By Fvckers'
262
- }, { quoted: m })
367
+ await sock.sendAIRich(jid, {
368
+ headerText: "# Instagram Reels",
369
+ contentText: "Contoh tampilan Instagram Reels.",
370
+
371
+ reels: {
372
+ username: "@swiper_reels",
373
+ title: "Reels Keren",
374
+ profileIconUrl: "https://c.termai.cc/i192/PXphkj.jpg",
375
+ thumbnailUrl: "https://c.termai.cc/i192/PXphkj.jpg",
376
+ videoUrl: "https://c.termai.cc/v145/FCZyDvC.mp4",
377
+ likes_count: 500,
378
+ view_count: 10000
379
+ },
380
+
381
+ suggested: [
382
+ "SWIPER FVCK",
383
+ "FVCKERS"
384
+ ],
385
+
386
+ footerText: "Generate By Fvckers AI"
387
+ });
263
388
  ```
264
389
 
265
390
  ---
266
391
 
267
- ### ✨ Rich Inline Entites
392
+ ### 💡 AI Rich Tip
268
393
 
269
394
  ```
270
- await sock.sendMessage(jid, {
271
- disclaimerText: 'Inline Entities',
272
- headerText: '## Check!',
273
- links: [
274
- {
275
- text: `Website`,
276
- title: " Portofolio",
277
- url: "https://swiper.my.id"
278
- }
279
- ],
280
- footerText: 'Generate By Fvckers'
281
- }, { quoted: m })
395
+ await sock.sendAIRich(jid, {
396
+ headerText: "# Important Tip",
397
+
398
+ tip: "Jangan pernah membagikan API Key kepada orang lain.",
399
+
400
+ suggested: [
401
+ "SWIPER FVCK",
402
+ "FVCKERS"
403
+ ],
404
+
405
+ footerText: "Generate By Fvckers AI"
406
+ });
407
+ ```
408
+
409
+ ---
410
+
411
+ ### ℹ️ AI Rich Metadata
412
+
413
+ ```
414
+ await sock.sendAIRich(jid, {
415
+ headerText: "# System Information",
416
+
417
+ metadata: "FVCKERS BOTZ | Version 1.0.0 | Node.js 24",
418
+
419
+ suggested: [
420
+ "SWIPER FVCK",
421
+ "FVCKERS"
422
+ ],
423
+
424
+ footerText: "Generate By Fvckers AI"
425
+ });
426
+ ```
427
+
428
+ ---
429
+
430
+ ### 🔗 AI Rich Source
431
+
432
+ ```
433
+ await sock.sendAIRich(jid, {
434
+ headerText: "# Source Information",
435
+ contentText: "Dokumentasi dan repository project.",
436
+
437
+ source: [
438
+ {
439
+ icon: "https://google.com/favicon.ico",
440
+ url: "https://github.com/WhiskeySockets/Baileys",
441
+ title: "Baileys Repository",
442
+ subtitle: "GitHub"
443
+ }
444
+ ],
445
+
446
+ suggested: [
447
+ "SWIPER FVCK",
448
+ "FVCKERS"
449
+ ],
450
+
451
+ footerText: "Generate By Fvckers AI"
452
+ });
453
+ ```
454
+
455
+ ---
456
+
457
+ ### 📅 AI Rich Widget
458
+
459
+ ```
460
+ await sock.sendAIRich(jid, {
461
+ headerText: "# Event Schedule",
462
+
463
+ widget: {
464
+ title: "Jadwal Event Fvckers",
465
+ sections: [
466
+ {
467
+ title: "Main Event",
468
+ subtitle: "Live Coding",
469
+ time: "20:00 WIB"
470
+ }
471
+ ],
472
+ actions: [
473
+ {
474
+ label: "Join Live",
475
+ kind: "OPEN_URL",
476
+ state: "ACTIVE"
477
+ }
478
+ ]
479
+ },
480
+
481
+ suggested: [
482
+ "SWIPER FVCK",
483
+ "FVCKERS"
484
+ ],
485
+
486
+ footerText: "Generate By Fvckers AI"
487
+ });
488
+ ```
489
+
490
+ ---
491
+
492
+ ### 🔘 AI Rich Footer Action
493
+
494
+ ```
495
+ await sock.sendAIRich(jid, {
496
+ headerText: "# Contact Information",
497
+ contentText: "Hubungi administrator untuk informasi lebih lanjut.",
498
+
499
+ footerAction: {
500
+ text: "Hubungi Admin",
501
+ type: "OPEN_URL",
502
+ url: "https://wa.me/6281234567890"
503
+ },
504
+
505
+ suggested: [
506
+ "SWIPER FVCK",
507
+ "FVCKERS"
508
+ ],
509
+
510
+ footerText: "Generate By Fvckers AI"
511
+ });
512
+ ```
513
+
514
+ ---
515
+
516
+ ### 💬 AI Rich Suggested
517
+
518
+ ```
519
+ await sock.sendAIRich(jid, {
520
+ headerText: "# FVCKERS Assistant",
521
+ contentText: "Silakan pilih salah satu rekomendasi berikut.",
522
+
523
+ suggested: [
524
+ "SWIPER FVCK",
525
+ "FVCKERS"
526
+ ],
527
+
528
+ footerText: "Generate By Fvckers AI"
529
+ });
530
+ ```
531
+
532
+ ---
533
+
534
+ ### 📚 AI Rich Multi Post
535
+
536
+ #### Supports multiple posts in one message with carousel view.
537
+
538
+ ```
539
+ await sock.sendAIRich(jid, {
540
+ headerText: "# Multi Instagram Posts",
541
+ contentText: "Geser untuk melihat postingan lainnya.",
542
+
543
+ post: [
544
+ {
545
+ title: "Postingan 1",
546
+ username: "@swiper_fvck",
547
+ profile_picture_url: "https://c.termai.cc/i192/PXphkj.jpg",
548
+ thumbnail_url: "https://c.termai.cc/i192/PXphkj.jpg",
549
+ caption: "Ini caption post pertama.",
550
+ likes_count: 999,
551
+ post_url: "https://instagram.com/p/WjdGvsjw",
552
+ is_verified: true
553
+ },
554
+ {
555
+ title: "Postingan 2",
556
+ username: "@fvckers_ai",
557
+ profile_picture_url: "https://c.termai.cc/i192/PXphkj.jpg",
558
+ thumbnail_url: "https://c.termai.cc/i192/PXphkj.jpg",
559
+ caption: "Ini caption post kedua.",
560
+ likes_count: 500,
561
+ post_url: "https://instagram.com/p/xxx",
562
+ is_verified: false
563
+ }
564
+ ],
565
+
566
+ suggested: [
567
+ "SWIPER FVCK",
568
+ "FVCKERS"
569
+ ],
570
+
571
+ footerText: "Generate By Fvckers AI"
572
+ });
573
+ ```
574
+
575
+ ---
576
+
577
+ ### 🎞️ AI Rich Multi Reels
578
+
579
+ #### Supports multiple Reels videos in one post with a carousel view.
580
+
581
+ ```
582
+ await sock.sendAIRich(jid, {
583
+ headerText: "# Multi Instagram Reels",
584
+ contentText: "Geser untuk melihat Reels lainnya.",
585
+
586
+ reels: [
587
+ {
588
+ username: "@swiper_reels",
589
+ title: "Reels Keren 1",
590
+ profileIconUrl: "https://c.termai.cc/i192/PXphkj.jpg",
591
+ thumbnailUrl: "https://c.termai.cc/i192/PXphkj.jpg",
592
+ videoUrl: "https://c.termai.cc/v145/FCZyDvC.mp4",
593
+ likes_count: 500,
594
+ view_count: 10000
595
+ },
596
+ {
597
+ username: "@fvckers_reels",
598
+ title: "Reels Keren 2",
599
+ profileIconUrl: "https://c.termai.cc/i192/PXphkj.jpg",
600
+ thumbnailUrl: "https://c.termai.cc/i192/PXphkj.jpg",
601
+ videoUrl: "https://c.termai.cc/v145/FCZyDvC.mp4",
602
+ likes_count: 1200,
603
+ view_count: 50000
604
+ }
605
+ ],
606
+
607
+ suggested: [
608
+ "SWIPER FVCK",
609
+ "FVCKERS"
610
+ ],
611
+
612
+ footerText: "Generate By Fvckers AI"
613
+ });
282
614
  ```
283
615
 
284
616
  ---
@@ -286,11 +618,8 @@ await sock.sendMessage(jid, {
286
618
  ### 📍 Button Location
287
619
 
288
620
  ```
289
- const fs = require("fs");
290
- const sharp = require("sharp");
291
- const axios = require("axios");
292
621
  let prefix = ".";
293
- async function getLocationThumb(input = './media/image/thumbnail.jpg') {
622
+ async function getLocationThumb(input = './thumbnail.jpg') {
294
623
  try {
295
624
  let buffer;
296
625
  if (/^https?:\/\//.test(input)) {
@@ -306,7 +635,7 @@ await sock.sendMessage(jid, {
306
635
  return Buffer.alloc(0);
307
636
  }
308
637
  }
309
- const thumb = await getLocationThumb('./media/image/thumbnail.jpg');
638
+ const thumb = await getLocationThumb('./thumbnail.jpg');
310
639
  const buttonMessage = {
311
640
  location: {
312
641
  degreesLatitude: 0,
@@ -357,7 +686,9 @@ await sock.sendMessage(jid, {
357
686
  buttons: [
358
687
  {
359
688
  buttonId: "single_select",
360
- buttonText: { displayText: "Select Menu" },
689
+ buttonText: {
690
+ displayText: "Select Menu"
691
+ },
361
692
  type: 1,
362
693
  nativeFlowInfo: {
363
694
  name: "single_select",
@@ -368,9 +699,9 @@ await sock.sendMessage(jid, {
368
699
  title: "Group",
369
700
  rows: [
370
701
  {
371
- title: `Button`,
372
- description: `> Ini tampilan button`,
373
- id: `.listb`
702
+ title: "Button",
703
+ description: "> Ini tampilan button",
704
+ id: ".listb"
374
705
  }
375
706
  ]
376
707
  }
@@ -389,13 +720,17 @@ await sock.sendMessage(jid, {
389
720
 
390
721
  ```
391
722
  await sock.sendMessage(jid, {
392
- image: { url: "https://upload.fvckers.my.id/y1z56qmqj90wv8.jpg" },
723
+ image: {
724
+ url: "https://upload.fvckers.my.id/y1z56qmqj90wv8.jpg"
725
+ },
393
726
  text: "Hello World",
394
727
  footer: "FVCKERS",
395
728
  buttons: [
396
729
  {
397
730
  buttonId: "single_select",
398
- buttonText: { displayText: "Select Menu" },
731
+ buttonText: {
732
+ displayText: "Select Menu"
733
+ },
399
734
  type: 1,
400
735
  nativeFlowInfo: {
401
736
  name: "single_select",
@@ -406,9 +741,9 @@ await sock.sendMessage(jid, {
406
741
  title: "Group",
407
742
  rows: [
408
743
  {
409
- title: `Button`,
410
- description: `> Ini tampilan button`,
411
- id: `.listb`
744
+ title: "Button",
745
+ description: "> Ini tampilan button",
746
+ id: ".listb"
412
747
  }
413
748
  ]
414
749
  }
@@ -427,22 +762,22 @@ await sock.sendMessage(jid, {
427
762
 
428
763
  ```
429
764
  await sock.sendMessage(jid, {
430
- text: "Hello World",
431
- buttons: [
432
- {
433
- buttonId: ".menu",
434
- buttonText: {
435
- displayText: "Menu"
436
- }
437
- },
438
- {
439
- buttonId: ".owner",
440
- buttonText: {
441
- displayText: "Owner"
442
- }
443
- }
444
- ]
445
- })
765
+ text: "Hello World",
766
+ buttons: [
767
+ {
768
+ buttonId: ".menu",
769
+ buttonText: {
770
+ displayText: "Menu"
771
+ }
772
+ },
773
+ {
774
+ buttonId: ".owner",
775
+ buttonText: {
776
+ displayText: "Owner"
777
+ }
778
+ }
779
+ ]
780
+ });
446
781
  ```
447
782
 
448
783
  ---
@@ -451,23 +786,25 @@ await sock.sendMessage(jid, {
451
786
 
452
787
  ```
453
788
  await sock.sendMessage(jid, {
454
- image: { url: "https://upload.fvckers.my.id/y1z56qmqj90wv8.jpg" },
455
- text: "Hello World",
456
- buttons: [
457
- {
458
- buttonId: ".menu",
459
- buttonText: {
460
- displayText: "Menu"
461
- }
789
+ image: {
790
+ url: "https://upload.fvckers.my.id/y1z56qmqj90wv8.jpg"
462
791
  },
463
- {
464
- buttonId: ".owner",
465
- buttonText: {
466
- displayText: "Owner"
467
- }
468
- }
469
- ]
470
- })
792
+ text: "Hello World",
793
+ buttons: [
794
+ {
795
+ buttonId: ".menu",
796
+ buttonText: {
797
+ displayText: "Menu"
798
+ }
799
+ },
800
+ {
801
+ buttonId: ".owner",
802
+ buttonText: {
803
+ displayText: "Owner"
804
+ }
805
+ }
806
+ ]
807
+ });
471
808
  ```
472
809
 
473
810
  ---
@@ -476,11 +813,18 @@ await sock.sendMessage(jid, {
476
813
 
477
814
  ```
478
815
  const img = await generateWAMessageContent(
479
- { image: { url: "https://upload.fvckers.my.id/y1z56qmqj90wv8.jpg" }},
480
- { upload: sock.waUploadToServer }
816
+ {
817
+ image: {
818
+ url: "https://upload.fvckers.my.id/y1z56qmqj90wv8.jpg"
819
+ }
820
+ },
821
+ {
822
+ upload: sock.waUploadToServer
823
+ }
481
824
  );
825
+
482
826
  const msg = generateWAMessageFromContent(
483
- m.chat,
827
+ jid,
484
828
  {
485
829
  viewOnceMessageV2: {
486
830
  message: {
@@ -496,12 +840,12 @@ const msg = generateWAMessageFromContent(
496
840
  text: "test"
497
841
  },
498
842
  contextInfo: {
499
- mentionedJid: [m.sender],
843
+ mentionedJid: [],
500
844
  forwardingScore: 7,
501
845
  isForwarded: true,
502
846
  forwardedNewsletterMessageInfo: {
503
- newsletterName: `Fvckers`,
504
- newsletterJid: `1@newsletter`
847
+ newsletterName: "Fvckers",
848
+ newsletterJid: "1@newsletter"
505
849
  }
506
850
  },
507
851
  nativeFlowMessage: {
@@ -555,7 +899,7 @@ const msg = generateWAMessageFromContent(
555
899
  rows: [
556
900
  {
557
901
  title: "Menu 2",
558
- description: "> Menu2",
902
+ description: "> Menu 2",
559
903
  id: "menu2"
560
904
  }
561
905
  ]
@@ -603,15 +947,9 @@ const msg = generateWAMessageFromContent(
603
947
  ]
604
948
  },
605
949
  {
606
- title: "",
607
- highlight_label: "",
608
- rows: [
609
- {
610
- title: "Menu 3",
611
- description: "> Menu 3",
612
- id: "menu3"
613
- }
614
- ]
950
+ title: "Menu 3",
951
+ description: "> Menu 3",
952
+ id: "menu3"
615
953
  }
616
954
  ],
617
955
  has_multiple_buttons: true
@@ -637,10 +975,10 @@ const msg = generateWAMessageFromContent(
637
975
  }
638
976
  }
639
977
  },
640
- { quoted: m }
978
+ {}
641
979
  );
642
980
 
643
- await sock.relayMessage(m.chat, msg.message, {
981
+ await sock.relayMessage(jid, msg.message, {
644
982
  messageId: msg.key.id
645
983
  });
646
984
  ```
@@ -651,65 +989,63 @@ await sock.relayMessage(m.chat, msg.message, {
651
989
 
652
990
  ```
653
991
  await sock.sendMessage(jid, {
654
- poll: {
655
- name: "Pilih Bahasa",
656
- values: [
657
- "JavaScript",
658
- "Python",
659
- "Go"
660
- ],
661
- selectableCount: 1
662
- }
663
- })
992
+ poll: {
993
+ name: "Pilih Bahasa",
994
+ values: [
995
+ "JavaScript",
996
+ "Python",
997
+ "Go"
998
+ ],
999
+ selectableCount: 1
1000
+ }
1001
+ });
664
1002
  ```
665
1003
 
666
1004
  ---
667
1005
 
668
1006
  ### 👥 Group Management
669
1007
 
670
- Create Group
1008
+ #### Create Group
671
1009
 
672
1010
  ```
673
1011
  await sock.groupCreate(
674
- "Test Group",
675
- [
676
- "628xxxx@s.whatsapp.net"
677
- ]
678
- )
1012
+ "Test Group",
1013
+ [
1014
+ "628xxxx@s.whatsapp.net"
1015
+ ]
1016
+ );
679
1017
  ```
680
1018
 
681
- Get Metadata
1019
+ #### Get Metadata
682
1020
 
683
1021
  ```
684
- const metadata =
685
- await sock.groupMetadata(groupJid)
1022
+ const metadata = await sock.groupMetadata(jid);
686
1023
 
687
- console.log(metadata)
1024
+ console.log(metadata);
688
1025
  ```
689
1026
 
690
1027
  ---
691
1028
 
692
1029
  ### 📢 Newsletter / Channel
693
1030
 
694
- Create Channel
1031
+ #### Create Channel
695
1032
 
696
1033
  ```
697
1034
  await sock.newsletterCreate(
698
- "FVCKERS Channel",
699
- "Official Channel"
700
- )
1035
+ "FVCKERS Channel",
1036
+ "Official Channel"
1037
+ );
701
1038
  ```
702
1039
 
703
- Get Metadata
1040
+ #### Get Metadata
704
1041
 
705
1042
  ```
706
- const meta =
707
- await sock.newsletterMetadata(
1043
+ const meta = await sock.newsletterMetadata(
708
1044
  "invite",
709
1045
  inviteCode
710
- )
1046
+ );
711
1047
 
712
- console.log(meta)
1048
+ console.log(meta);
713
1049
  ```
714
1050
 
715
1051
  ---
@@ -718,11 +1054,11 @@ console.log(meta)
718
1054
 
719
1055
  ```
720
1056
  await sock.sendMessage(
721
- "status@broadcast",
722
- {
723
- text: "Hello Status"
724
- }
725
- )
1057
+ "status@broadcast",
1058
+ {
1059
+ text: "Hello Status"
1060
+ }
1061
+ );
726
1062
  ```
727
1063
 
728
1064
  ---
@@ -731,23 +1067,22 @@ await sock.sendMessage(
731
1067
 
732
1068
  ```
733
1069
  sock.ev.on(
734
- "messages.upsert",
735
- async ({ messages }) => {
1070
+ "messages.upsert",
1071
+ async ({ messages }) => {
1072
+ const message = messages[0];
736
1073
 
737
- const m = messages[0]
1074
+ if (!message.message) return;
738
1075
 
739
- if (!m.message) return
740
-
741
- console.log(m)
742
- }
743
- )
1076
+ console.log(message);
1077
+ }
1078
+ );
744
1079
  ```
745
1080
 
746
1081
  ---
747
1082
 
748
1083
  ### 🔐 Authentication
749
1084
 
750
- Baileys mendukung:
1085
+ #### Baileys mendukung:
751
1086
 
752
1087
  - QR Login
753
1088
  - Pairing Code Login
@@ -760,9 +1095,11 @@ Baileys mendukung:
760
1095
  ### ⚠️ Notes
761
1096
 
762
1097
  - Gunakan Node.js v20+
763
- - Jangan bagikan folder session
764
- - Simpan credentials dengan aman
765
- - Hindari spam agar akun tidak terkena limit WhatsApp
1098
+ - Jangan bagikan folder session.
1099
+ - Simpan credentials dengan aman.
1100
+ - Hindari spam agar akun tidak terkena limit WhatsApp.
1101
+ - Gunakan "jid" sesuai format JID WhatsApp.
1102
+ - AI Rich Response merupakan fitur tambahan pada fork FVCKERS Baileys.
766
1103
 
767
1104
  ---
768
1105
 
@@ -770,28 +1107,28 @@ Baileys mendukung:
770
1107
 
771
1108
  For questions, support, or collaboration, feel free to contact the developer:
772
1109
 
773
- - **Telegram**: [Telegram Contact](https://t.me/swiperfvck)
774
- - **Channel WhatsApp**: [Channel WhatsApp](https://whatsapp.com/channel/0029VbCbvx67YScxkW6HkY01)
1110
+ - Telegram: "Telegram Contact" (https://t.me/swiperfvck)
1111
+ - Channel WhatsApp: "Channel WhatsApp" (https://whatsapp.com/channel/0029VbCbvx67YScxkW6HkY01)
775
1112
 
776
1113
  ---
777
1114
 
778
1115
  ### 💖 Contributors outside the Baileys code
779
1116
 
780
- Thanks to the following awesome contributors who help improve this project
1117
+ #### Thanks to the following awesome contributors who help improve this project.
781
1118
 
782
1119
  <table>
783
1120
  <tr>
784
1121
  <td align="center">
785
1122
  <a href="https://github.com/kiuur">
786
1123
  <img src="https://github.com/kiuur.png" width="80px;" style="border-radius:50%;" alt="Contributor"/>
787
- <br />
1124
+ <br/>
788
1125
  <sub><b>KyuuRzy</b></sub>
789
1126
  </a>
790
1127
  </td>
791
- <td align="center">
1128
+ <td align="center">
792
1129
  <a href="https://github.com/SwipFvck">
793
1130
  <img src="https://upload.fvckers.my.id/3lh3rdmrak51f0.png" width="80px;" style="border-radius:50%;" alt="Developer"/>
794
- <br />
1131
+ <br/>
795
1132
  <sub><b>Swiper Fvck</b></sub>
796
1133
  </a>
797
1134
  </td>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fvckerss/baileys",
3
3
  "type": "module",
4
- "version": "1.0.20",
4
+ "version": "1.0.21",
5
5
  "description": "Baileys mod by Swiper",
6
6
  "keywords": [
7
7
  "whatsapp",