forked from LoL-Human/Case-WA-Bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
2617 lines (2568 loc) · 133 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Tambahin nama author lah
* Author MhankBarBar, Farhan
* Tambahin ya Cape Gan ngefix² Yg Ga work
* Jan numpang nama doank
- What's New?
* New Features
*/
const {
WAConnection,
MessageType,
Presence,
MessageOptions,
Mimetype,
WALocationMessage,
WA_MESSAGE_STUB_TYPES,
ReconnectMode,
ProxyAgent,
GroupSettingChange,
waChatKey,
mentionedJid,
processTime,
} = require("@adiwajshing/baileys")
const axios = require('axios')
const fs = require('fs')
const crypto = require('crypto')
const imageToBase64 = require('image-to-base64')
const imgbb = require('imgbb-uploader')
const moment = require('moment-timezone')
const { exec } = require('child_process')
const kagApi = require('@kagchi/kag-api')
const fetch = require('node-fetch')
const tiktod = require('tiktok-scraper')
const ffmpeg = require('fluent-ffmpeg')
const { removeBackgroundFromImageFile } = require('remove.bg')
const lolis = require('lolis.life')
const loli = new lolis()
const Math_js = require('mathjs')
const cd = 4.32e+7
const { wait, simih, getBuffer, h2k, generateMessageID, getGroupAdmins, getRandom, banner, start, info, success, close } = require('./lib/functions')
const { fetchJson } = require('./lib/fetcher')
const { recognize } = require('./lib/ocr')
const { color, bgcolor } = require('./lib/color')
const { help } = require('./Fxc7/help')
const { bahasa } = require('./Fxc7/bahasa')
const { donasi } = require('./Fxc7/donasi')
const welkom = JSON.parse(fs.readFileSync('./database/json/welkom.json'))
const nsfw = JSON.parse(fs.readFileSync('./database/json/nsfw.json'))
const samih = JSON.parse(fs.readFileSync('./database/json/simi.json'))
const user = JSON.parse(fs.readFileSync('./database/json/user.json'))
const adminNumber = JSON.parse(fs.readFileSync('./database/json/admin.json'))
const anime = JSON.parse(fs.readFileSync('./database/json/anime.json'))
const blocked = JSON.parse(fs.readFileSync('./database/json/blocked.json'))
const anlink = JSON.parse(fs.readFileSync('./database/json/antilink.json'))
let {
groupLimit,
memberLimit,
} = require('./database/json/setting.json')
ban = []
premium = ["[email protected]"]
const vcard = 'BEGIN:VCARD\n'
+ 'VERSION:3.0\n'
+ 'FN:Farhan\n'
+ 'ORG:Creator FXC7;\n'
+ 'TEL;type=CELL;type=VOICE;waid=628311800241:+62 831-1800-241\n'
+ 'END:VCARD'
prefix = '.'
ig = 'https://www.instagram.com/_farhan_xcode7'
name = '~ F X C 7 B O T'
function kyun(seconds){
function pad(s){
return (s < 10 ? '0' : '') + s;
}
var hours = Math.floor(seconds / (60*60));
var minutes = Math.floor(seconds % (60*60) / 60);
var seconds = Math.floor(seconds % 60);
//return pad(hours) + ':' + pad(minutes) + ':' + pad(seconds)
return `${pad(hours)} Jam ${pad(minutes)} Menit ${pad(seconds)} Detik`
}
async function starts() {
const client = new WAConnection()
client.logger.level = 'warn'
console.log(banner.string)
client.on('qr', () => {
console.log(color('[','white'), color('!','red'), color(']','white'), color(' Scan the qr code above'))
})
fs.existsSync('./Fxc7.json') && client.loadAuthInfo('./Fxc7.json')
client.on('connecting', () => {
start('2', 'Connecting...')
})
client.on('open', () => {
success('2', 'Connected')
})
await client.connect({timeoutMs: 30*1000})
fs.writeFileSync('./Fxc7.json', JSON.stringify(client.base64EncodedAuthInfo(), null, '\t'))
client.on('group-participants-update', async (anu) => {
if (!welkom.includes(anu.jid)) return
try {
const mdata = await client.groupMetadata(anu.jid)
console.log(anu)
if (anu.action == 'add') {
num = anu.participants[0]
try {
ppimg = await client.getProfilePicture(`${anu.participants[0].split('@')[0]}@c.us`)
} catch {
ppimg = 'https://i0.wp.com/www.gambarunik.id/wp-content/uploads/2019/06/Top-Gambar-Foto-Profil-Kosong-Lucu-Tergokil-.jpg'
}
teks = `Halo @${num.split('@')[0]}\nSelamat datang di group *${mdata.subject}*`
let buff = await getBuffer(ppimg)
client.sendMessage(mdata.id, buff, MessageType.image, {caption: teks, contextInfo: {"mentionedJid": [num]}})
} else if (anu.action == 'remove') {
num = anu.participants[0]
try {
ppimg = await client.getProfilePicture(`${num.split('@')[0]}@c.us`)
} catch {
ppimg = 'https://i0.wp.com/www.gambarunik.id/wp-content/uploads/2019/06/Top-Gambar-Foto-Profil-Kosong-Lucu-Tergokil-.jpg'
}
teks = `Sayonara @${num.split('@')[0]}👋`
let buff = await getBuffer(ppimg)
client.sendMessage(mdata.id, buff, MessageType.image, {caption: teks, contextInfo: {"mentionedJid": [num]}})
}
} catch (e) {
console.log('Error : %s', color(e, 'red'))
}
})
client.on('CB:Blocklist', json => {
if (blocked.length > 2) return
for (let i of json[1].blocklist) {
blocked.push(i.replace('c.us','s.whatsapp.net'))
}
})
client.on('chat-update', async (mek) => {
try {
if (!mek.hasNewMessage) return
mek = JSON.parse(JSON.stringify(mek)).messages[0]
if (!mek.message) return
if (mek.key && mek.key.remoteJid == 'status@broadcast') return
if (mek.key.fromMe) return
global.prefix
global.blocked
const content = JSON.stringify(mek.message)
const from = mek.key.remoteJid
const type = Object.keys(mek.message)[0]
const insom = from.endsWith('@g.us')
const botFebb = insom ? mek.participant : mek.key.remoteJid
pushname2 = client.contacts[botFebb] != undefined ? client.contacts[botFebb].vname || client.contacts[botFebb].notify : undefined
const BarBarApi = 'barbar api'
const ZeksApi = 'zeks api'
const VhtearApi = 'vhtear api'
const TobzApi = 'BotWeA'
const totalchat = await client.chats.all()
const { text, extendedText, contact, location, liveLocation, image, video, sticker, document, audio, product } = MessageType
const speed = require('performance-now')
const date = new Date().toLocaleDateString()
const time = moment.tz('Asia/Jakarta').format('HH:mm:ss')
const jam = moment.tz('Asia/Jakarta').format('HH:mm')
body = (type === 'conversation' && mek.message.conversation.startsWith(prefix)) ? mek.message.conversation : (type == 'imageMessage') && mek.message.imageMessage.caption.startsWith(prefix) ? mek.message.imageMessage.caption : (type == 'videoMessage') && mek.message.videoMessage.caption.startsWith(prefix) ? mek.message.videoMessage.caption : (type == 'extendedTextMessage') && mek.message.extendedTextMessage.text.startsWith(prefix) ? mek.message.extendedTextMessage.text : ''
budy = (type === 'conversation') ? mek.message.conversation : (type === 'extendedTextMessage') ? mek.message.extendedTextMessage.text : ''
const command = body.slice(1).trim().split(/ +/).shift().toLowerCase()
const args = body.trim().split(/ +/).slice(1)
const isCmd = body.startsWith(prefix)
client.chatRead (from)
mess = {
wait: `*WAIT KAK ${pushname2}* Sedang di Prosess...⏳`,
success: '*Sukses...*',
error: {
stick: ' *Gagal, terjadi kesalahan saat mengkonversi gambar ke sticker*',
Iv: '*Link tidak valid*'
},
only: {
group: '*Maaf Perintah ini hanya bisa di gunakan dalam group!*',
benned: '*Anda Ke Banned Silahkan Hubungi Owner Agar Membuka Banned Anda*',
ownerG: '*Maaf Perintah ini hanya bisa di gunakan oleh owner group!*',
ownerB: '*Maaf Perintah ini hanya bisa di gunakan oleh owner bot!* ',
premium: '*Fitur Ini Khusus User Premium*',
userB: `-= | DAFTAR USER | =-\nMaaf *${pushname2}*\nKamu belum Terdaftar didalam database,\n\nUntuk Daftarnya \nContoh : ${prefix}daftar Farhan/17/Banyuwangi\n\n-=⎿ *${name}* ⏋=-`,
admin: '*Maaf Perintah ini hanya bisa di gunakan oleh admin group!*',
Badmin: '*Maaf Perintah ini hanya bisa di gunakan ketika bot menjadi admin!*'
}
}
const botNumber = client.user.jid
const ownerNumber = ["[email protected]"]
const isGroup = from.endsWith('@g.us')
const sender = isGroup ? mek.participant : mek.key.remoteJid
const groupMetadata = isGroup ? await client.groupMetadata(from) : ''
const groupName = isGroup ? groupMetadata.subject : ''
const groupId = isGroup ? groupMetadata.jid : ''
const groupMembers = isGroup ? groupMetadata.participants : ''
const groupDesc = isGroup ? groupMetadata.desc : ''
const groupAdmins = isGroup ? getGroupAdmins(groupMembers) : ''
const isBotGroupAdmins = groupAdmins.includes(botNumber) || false
const isGroupAdmins = groupAdmins.includes(sender) || false
const isWelkom = isGroup ? welkom.includes(from) : false
const isNsfw = isGroup ? nsfw.includes(from) : false
const isAnime = isGroup ? anime.includes(from) : false
const isSimi = isGroup ? samih.includes(from) : false
const isOwner = ownerNumber.includes(sender)
const isUser = user.includes(sender)
const isBanned = ban.includes(sender)
const isPrem = premium.includes(sender)
const isUrl = (url) => {
return url.match(new RegExp(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)/, 'gi'))
}
const reply = (teks) => {
client.sendMessage(from, teks, text, {quoted:mek})
}
const sendMess = (hehe, teks) => {
client.sendMessage(hehe, teks, text)
}
const mentions = (teks, memberr, id) => {
(id == null || id == undefined || id == false) ? client.sendMessage(from, teks.trim(), extendedText, {contextInfo: {"mentionedJid": memberr}}) : client.sendMessage(from, teks.trim(), extendedText, {quoted: mek, contextInfo: {"mentionedJid": memberr}})
}
colors = ['red','white','black','blue','yellow','green']
const isMedia = (type === 'imageMessage' || type === 'videoMessage')
const isQuotedImage = type === 'extendedTextMessage' && content.includes('imageMessage')
const isQuotedVideo = type === 'extendedTextMessage' && content.includes('videoMessage')
const isQuotedSticker = type === 'extendedTextMessage' && content.includes('stickerMessage')
if (!isGroup && isCmd) console.log('\x1b[1;31m~\x1b[1;37m>', '[\x1b[1;32mEXEC\x1b[1;37m]', time, color(command), 'from', color(sender.split('@')[0]), 'args :', color(args.length))
if (!isGroup && !isCmd) console.log('\x1b[1;31m~\x1b[1;37m>', '[\x1b[1;31mRECV\x1b[1;37m]', time, color('Message'), 'from', color(sender.split('@')[0]), 'args :', color(args.length))
if (isCmd && isGroup) console.log('\x1b[1;31m~\x1b[1;37m>', '[\x1b[1;32mEXEC\x1b[1;37m]', time, color(command), 'from', color(sender.split('@')[0]), 'in', color(groupName), 'args :', color(args.length))
if (!isCmd && isGroup) console.log('\x1b[1;31m~\x1b[1;37m>', '[\x1b[1;31mRECV\x1b[1;37m]', time, color('Message'), 'from', color(sender.split('@')[0]), 'in', color(groupName), 'args :', color(args.length))
switch(command) {
case 'join':
if (args.length == 0) return client.reply(from, `maaf ,bot ini hanya bisa dimasukkan ke grup `, id)
let linkgrup = body.slice(6)
let islink = linkgrup.match(/(https:\/\/chat.whatsapp.com)/gi)
let chekgrup = await client.inviteInfo(linkgrup)
if (!islink) return client.reply(from, 'Maaf link group-nya salah! ', id)
if (isOwnerBot) {
await client.joinGroupViaLink(linkgrup)
.then(async () => {
await client.sendText(from, 'Berhasil join grup via link!')
await client.sendText(chekgrup.id, ` *Hai Minna~* `)
})
} else {
let cgrup = await client.getAllGroups()
if (cgrup.length > groupLimit) return client.reply(from, `Sorry, the groups is not valid `, id)
if (cgrup.size < memberLimit) return client.reply(from, `Sorry, Bot wil not join if the group members do not exceed ${memberLimit} people`, id)
await client.joinGroupViaLink(linkgrup)
.then(async () => {
await client.reply(from, 'Berhasil join grup via link!', id)
})
.catch(() => {
client.reply(from, 'Gagal!', id)
})
}
break
case 'antilink':
client.updatePresence(from, Presence.composing)
if (!isUser) return reply(mess.only.userB)
if (isBanned) return reply(mess.only.benned)
if (!isGroup) return reply(mess.only.group)
if (!isGroupAdmins) return reply(mess.only.admin)
if (args.length < 1) return reply('pilih enable atau disable udin!!')
if (args[0] == 'enable') {
if (isSimi) return reply('Mode antilink sudah aktif')
anlink.push(from)
fs.writeFileSync('./src/antilink.json', JSON.stringify(anlink))
reply(`Sukses mengaktifkan mode antilink`)
} else if (args[0] == 'disable') {
anlink.splice(from, 1)
fs.writeFileSync('./src/antilink.json', JSON.stringify(anlink))
reply('Sukes menonaktifkan mode antilink️')
} else {
reply('pilih enable atau disable kak?')
}
break
case 'chatlist':
client.updatePresence(from, Presence.composing)
teks = 'This is list of chat number :\n'
for (let all of totalchat) {
teks += `~> @${all}\n`
}
teks += `Total : ${totalchat.length}`
client.sendMessage(from, teks.trim(), extendedText, {quoted: mek, contextInfo: {"mentionedJid": totalchat}})
break
case 'totaluser':
client.updatePresence(from, Presence.composing)
if (!isUser) return reply(mess.only.userB)
if (!isOwner) return reply(mess.only.ownerB)
teks = `╭────*「 *TOTAL USER ${name}* 」\n`
no = 0
for (let hehehe of user) {
no += 1
teks += `[${no.toString()}] @${hehehe.split('@')[0]}\n`
}
teks += `│+ Total Pengguna : ${user.length}\n╰──────*⎿ *${name}* ⏋*────`
client.sendMessage(from, teks.trim(), extendedText, {quoted: mek, contextInfo: {"mentionedJid": user}})
break
case 'daftar':
client.updatePresence(from, Presence.composing)
if (isUser) return reply('kamu sudah terdaftar')
if (isBanned) return reply(mess.only.benned)
if (args.length < 1) return reply(`Parameter Salah\nCommand : ${prefix}daftar nama/umur\nContoh : ${prefix}daftar Farhan/17/Banyuwangi`)
reg = body.slice(8)
jeneng = reg.split("/")[0];
umure = reg.split("/")[1];
asal = reg.split("/")[2];
user.push(sender)
fs.writeFileSync('./database/json/user.json', JSON.stringify(user))
client.sendMessage(from, `\`\`\`Pendaftaran berhasil dengan SN: TM08GK8PPHBSJDH10J\`\`\`\n\n\`\`\`Pada ${date} ${time}\`\`\`\n\`\`\`[Nama]: ${jeneng}\`\`\`\n\`\`\`[Nomor]: wa.me/${sender.split("@")[0]}\`\`\`\n\`\`\`[Umur]: ${umure} Tahun\`\`\`\n\`\`\`[Asal]: ${asal}\`\`\`\n\`\`\`Untuk menggunakan bot\`\`\`\n\`\`\`silahkan\`\`\`\n\`\`\`kirim ${prefix}help/menu\`\`\`\n\`\`\`\nTotal Pengguna: ${user.length} Orang\`\`\``, text, {quoted: mek})
break
case 'help':
case 'menu':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
uptime = process.uptime()
user.push(sender)
myMonths = ["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"];
myDays = ['Minggu','Senin','Selasa','Rabu','Kamis','Jum at','Sabtu'];
var tgl = new Date();
var day = tgl.getDate()
bulan = tgl.getMonth()
var thisDay = tgl.getDay(),
thisDay = myDays[thisDay];
var yy = tgl.getYear()
var year = (yy < 1000) ? yy + 1900 : yy;
const tanggal = `${thisDay}, ${day} - ${myMonths[bulan]} - ${year}`
client.sendMessage(from, help(prefix, ig, name, uptime, pushname2, user, tanggal, jam), text, {quoted: mek})
break
case 'bahasa':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
client.sendMessage(from, bahasa(), text, {quoted: mek})
break
case 'donasi':
case 'donate':
client.sendMessage(from, donasi(ig, name), text, {quoted: mek})
break
case 'info':
me = client.user
user.push(sender)
uptime = process.uptime()
teks = `⟩➢ *Nama Bot* : _${me.name}_\n⟩➢ *Nomer Bot* : _@${me.jid.split('@')[0]}_\n⟩➢ *prefix* : _${prefix}_\n⟩➢ *Total Block* : _${blocked.length}_\n⟩➢ *Aktif Sejak* : _${kyun(uptime)}_\n\n⟩➢ Total Pengguna: *${user.length}* User\n⟩➢ *Instagram* : https://www.instagram.com/_farhan_xcode7\n⟩➢ *Special Thanks To* :\n⟩➢ _Allah SWT_ \n⟩➢ _MahankBarBar`
buffer = await getBuffer(me.imgUrl)
client.sendMessage(from, buffer, image, {quoted: mek, caption: teks, contextInfo:{mentionedJid: [me.jid]}})
break
case 'blocklist':
teks = 'List Block :\n'
for (let block of blocked) {
teks += `~> @${block.split('@')[0]}\n`
}
teks += `Total : ${blocked.length}`
client.sendMessage(from, teks.trim(), extendedText, {quoted: mek, contextInfo: {"mentionedJid": blocked}})
break
case 'banlist':
ben = '```List Banned``` :\n'
for (let banned of ban) {
ben += `~> @${banned.split('@')[0]}\n`
}
ben += `Total : ${ban.length}`
client.sendMessage(from, ben.trim(), extendedText, {quoted: mek, contextInfo: {"mentionedJid": ban}})
break
case 'ocr':
if ((isMedia && !mek.message.videoMessage || isQuotedImage) && args.length == 0) {
const encmedia = isQuotedImage ? JSON.parse(JSON.stringify(mek).replace('quotedM','m')).message.extendedTextMessage.contextInfo : mek
const media = await client.downloadAndSaveMediaMessage(encmedia)
reply(mess.wait)
await recognize(media, {lang: 'eng+ind', oem: 1, psm: 3})
.then(teks => {
reply(teks.trim())
fs.unlinkSync(media)
})
.catch(err => {
reply(err.message)
fs.unlinkSync(media)
})
} else {
reply('Foto aja gan')
}
break
case 'gifstiker':
case 'stiker':
case 'sticker':
case 's':
if ((isMedia && !mek.message.videoMessage || isQuotedImage) && args.length == 0) {
const encmedia = isQuotedImage ? JSON.parse(JSON.stringify(mek).replace('quotedM','m')).message.extendedTextMessage.contextInfo : mek
const media = await client.downloadAndSaveMediaMessage(encmedia)
reply(mess.wait)
const ran= getRandom('.webp')
await ffmpeg(`./${media}`)
.input(media)
.on('start', function (cmd) {
console.log(`Started : ${cmd}`)
})
.on('error', function (err) {
console.log(`Error : ${err}`)
fs.unlinkSync(media)
reply(mess.error.stick)
})
.on('end', function () {
console.log('Finish')
buff = fs.readFileSync(ran)
client.sendMessage(from, buff, sticker, {quoted: mek})
fs.unlinkSync(media)
fs.unlinkSync(ran)
})
.addOutputOptions([`-vcodec`,`libwebp`,`-vf`,`scale='min(320,iw)':min'(320,ih)':force_original_aspect_ratio=decrease,fps=15, pad=320:320:-1:-1:[email protected], split [a][b]; [a] palettegen=reserve_transparent=on:transparency_color=ffffff [p]; [b][p] paletteuse`])
.toFormat('webp')
.save(ran)
} else if ((isMedia && mek.message.videoMessage.seconds < 11 || isQuotedVideo && mek.message.extendedTextMessage.contextInfo.quotedMessage.videoMessage.seconds < 11) && args.length == 0) {
const encmedia = isQuotedVideo ? JSON.parse(JSON.stringify(mek).replace('quotedM','m')).message.extendedTextMessage.contextInfo : mek
const media = await client.downloadAndSaveMediaMessage(encmedia)
const ran= getRandom('.webp')
reply(mess.wait)
await ffmpeg(`./${media}`)
.inputFormat(media.split('.')[1])
.on('start', function (cmd) {
console.log(`Started : ${cmd}`)
})
.on('error', function (err) {
console.log(`Error : ${err}`)
fs.unlinkSync(media)
tipe = media.endsWith('.mp4') ? 'video' : 'gif'
reply(`\`\`\`Gagal, pada saat mengkonversi ${tipe} ke stiker\`\`\``)
})
.on('end', function () {
console.log('Finish')
buff = fs.readFileSync(ran)
client.sendMessage(from, buff, sticker, {quoted: mek})
fs.unlinkSync(media)
fs.unlinkSync(ran)
})
.addOutputOptions([`-vcodec`,`libwebp`,`-vf`,`scale='min(320,iw)':min'(320,ih)':force_original_aspect_ratio=decrease,fps=15, pad=320:320:-1:-1:[email protected], split [a][b]; [a] palettegen=reserve_transparent=on:transparency_color=ffffff [p]; [b][p] paletteuse`])
.toFormat('webp')
.save(ran)
} else if ((isMedia || isQuotedImage) && args[0] == 'nobg') {
const encmedia = isQuotedImage ? JSON.parse(JSON.stringify(mek).replace('quotedM','m')).message.extendedTextMessage.contextInfo : mek
const media = await client.downloadAndSaveMediaMessage(encmedia)
ranw = getRandom('.webp')
ranp = getRandom('.png')
reply(mess.wait)
keyrmbg = 'bcAvZyjYAjKkp1cmK8ZgQvWH'
await removeBackgroundFromImageFile({path: media, apiKey: keyrmbg.result, size: 'auto', type: 'auto', ranp}).then(res => {
fs.unlinkSync(media)
let buffer = Buffer.from(res.base64img, 'base64')
fs.writeFileSync(ranp, buffer, (err) => {
if (err) return reply('Gagal, Terjadi kesalahan, silahkan coba beberapa saat lagi.')
})
exec(`ffmpeg -i ${ranp} -vcodec libwebp -filter:v fps=fps=20 -lossless 1 -loop 0 -preset default -an -vsync 0 -s 512:512 ${ranw}`, (err) => {
fs.unlinkSync(ranp)
if (err) return reply(mess.error.stick)
buff = fs.readFileSync(ranw)
client.sendMessage(from, buff, sticker, {quoted: mek})
})
})
} else {
reply(`Kirim gambar dengan caption ${prefix}sticker atau tag gambar yang sudah dikirim`)
}
break
case 'owner':
client.sendMessage(from, {displayname: "Fxc7", vcard: vcard}, MessageType.contact, { quoted: mek})
client.sendMessage(from, 'Jika Mau Save Chat Aja Gan Ntar Disave Back:)',text, { quoted: mek} )
break
case 'fitnah':
case 'fake':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
if (!isGroup) return reply(mess.only.group)
arg = body.substring(body.indexOf(' ') + 1)
isi = arg.split('/')[0]
pesan = arg.split('/')[1]
pesan2 = arg.split('/')[2]
costum(pesan, isi, pesan2)
break
case 'infogc':
case 'groupinfo':
case 'infogrup':
case 'grupinfo':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
client.updatePresence(from, Presence.composing)
if (!isGroup) return reply(mess.only.group)
ppUrl = await client.getProfilePicture(from) // leave empty to get your own
buffer = await getBuffer(ppUrl)
client.sendMessage(from, buffer, image, {quoted: mek, caption: `*NAME* : ${groupName}\n*MEMBER* : ${groupMembers.length}\n*ADMIN* : ${groupAdmins.length}\n*DESK* : ${groupDesc}`})
break
case 'trendtwit':
client.updatePresence(from, Presence.composing)
if (!isUser) return reply(mess.only.daftarB)
data = await fetchJson(`https://docs-jojo.herokuapp.com/api/trendingtwitter`, {method: 'get'})
teks = '=================\n'
for (let i of data.result) {
teks += `*Hastag* : ${i.hastag}\n*link* : ${i.link}\n*rank* : ${i.rank}\n*Tweet* : ${i.tweet}\n=================\n`
}
reply(teks.trim())
break
case 'testime':
setTimeout( () => {
client.sendMessage(from, 'Waktu habis:v', text, {quoted: mek}) // ur cods
}, 10000) // 1000 = 1s,
setTimeout( () => {
client.sendMessage(from, '5 Detik lagi', text, {quoted: mek}) // ur cods
}, 5000) // 1000 = 1s,
setTimeout( () => {
client.sendMessage(from, '10 Detik lagi', text, {quoted: mek}) // ur cods
}, 0) // 1000 = 1s,
break
case 'animecry':
ranp = getRandom('.gif')
rano = getRandom('.webp')
anu = await fetchJson(`https://tobz-api.herokuapp.com/api/cry?apikey=${TobzApi}`, {method: 'get'})
if (!isUser) return reply(mess.only.userB)
if (isBanned) return reply(mess.only.benned)
if (!isGroup) return reply(mess.only.group)
if (anu.error) return reply(anu.error)
exec(`wget ${anu.result} -O ${ranp} && ffmpeg -i ${ranp} -vcodec libwebp -filter:v fps=fps=15 -lossless 1 -loop 0 -preset default -an -vsync 0 -s 512:512 ${rano}`, (err) => {
fs.unlinkSync(ranp)
if (err) return reply(mess.error.stick)
buffer = fs.readFileSync(rano)
client.sendMessage(from, buffer, sticker, {quoted: mek})
fs.unlinkSync(rano)
})
break
case 'neonime':
client.updatePresence(from, Presence.composing)
data = await fetchJson(`https://docs-jojo.herokuapp.com/api/neonime_lastest`, {method: 'get'})
if (!isUser) return reply(mess.only.userB)
if (isBanned) return reply(mess.only.benned)
if (!isGroup) return reply(mess.only.group)
teks = '################\n'
for (let i of data.result) {
teks += `*Title* : ${i.judul}\n*link* : ${i.link}\n*rilis* : ${i.rilis}\n###############\n`
}
reply(teks.trim())
break
case 'imoji':
if (args.length < 1) return reply('emojinya mana gan?')
if (!isUser) return reply(mess.only.daftarB)
if (isBanned) return reply(mess.only.benned)
ranp = getRandom('.png')
rano = getRandom('.webp')
teks = body.slice(7)
anu = await fetchJson(`https://api.zeks.xyz/api/emoji-image?apikey=${ZeksApi}&emoji=${teks}`, {method: 'get'})
if (anu.error) return reply(anu.error)
exec(`wget ${anu.result} -O ${ranp} && ffmpeg -i ${ranp} -vcodec libwebp -filter:v fps=fps=20 -lossless 1 -loop 0 -preset default -an -vsync 0 -s 512:512 ${rano}`, (err) => {
fs.unlinkSync(ranp)
if (err) return reply(mess.error.stick)
buffer = fs.readFileSync(rano)
client.sendMessage(from, buffer, sticker)
fs.unlinkSync(rano)
})
break
case 'animehug':
ranp = getRandom('.gif')
rano = getRandom('.webp')
anu = await fetchJson(`https://tobz-api.herokuapp.com/api/hug?apikey=${TobzApi}`, {method: 'get'})
if (!isUser) return reply(mess.only.userB)
if (isBanned) return reply(mess.only.benned)
if (!isGroup) return reply(mess.only.group)
if (anu.error) return reply(anu.error)
exec(`wget ${anu.result} -O ${ranp} && ffmpeg -i ${ranp} -vcodec libwebp -filter:v fps=fps=15 -lossless 1 -loop 0 -preset default -an -vsync 0 -s 512:512 ${rano}`, (err) => {
fs.unlinkSync(ranp)
if (err) return reply(mess.error.stick)
buffer = fs.readFileSync(rano)
client.sendMessage(from, buffer, sticker, {quoted: mek})
fs.unlinkSync(rano)
})
break
case 'linkgroup':
case 'linkgrup':
case 'linkgc':
case 'gruplink':
case 'grouplink':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
if (!isGroup) return reply(mess.only.group)
if (!isBotGroupAdmins) return reply(mess.only.Badmin)
linkgc = await client.groupInviteCode (from)
yeh = `https://chat.whatsapp.com/${linkgc}\n\nlink Group *${groupName}*`
client.sendMessage(from, yeh, text, {quoted: mek})
break
case 'hidetag':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
if (!isGroup) return reply(mess.only.group)
if (!isBotGroupAdmins) return reply(mess.only.Badmin)
var value = body.slice(9)
var group = await client.groupMetadata(from)
var member = group['participants']
var mem = []
member.map( async adm => {
mem.push(adm.id.replace('c.us', 's.whatsapp.net'))
})
var options = {
text: value,
contextInfo: { mentionedJid: mem },
quoted: mek
}
client.sendMessage(from, options, text)
break
case 'gantengcek':
case 'cekganteng':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
ganteng = body.slice(12)
const gan =['10%','30%','20%','40%','50%','60%','70%','62%','74%','83%','97%','100%','29%','94%','75%','82%','41%','39%']
const teng = gan[Math.floor(Math.random() * gan.length)]
client.sendMessage(from, 'Pertanyaan : Cek Ganteng Bang *'+ganteng+'*\n\nJawaban : '+ teng +'', text, { quoted: mek })
break
case 'cantikcek':
case 'cekcantik':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
cantik = body.slice(11)
if (args.length < 1) return reply('Yg Mau dicek Siapa Kak??')
const can =['10% banyak" perawatan ya kak:v\nCanda Perawatan:v','30% Semangat Kaka Merawat Dirinya><','20% Semangat Ya Kaka👍','40% Wahh Kaka><','50% kaka cantik deh><','60% Hai Cantik🐊','70% Hai Ukhty🐊','62% Kakak Cantik><','74% Kakak ni cantik deh><','83% Love You Kakak><','97% Assalamualaikum Ukhty🐊','100% Kakak Pake Susuk ya??:v','29% Semangat Kakak:)','94% Hai Cantik><','75% Hai Kakak Cantik','82% wihh Kakak Pasti Sering Perawatan kan??','41% Semangat:)','39% Lebih Semangat🐊']
const tik = can[Math.floor(Math.random() * can.length)]
client.sendMessage(from, 'Pertanyaan : Cantik Cek Kakak *'+cantik+'*\n\nPersen Kecantikan : '+ tik +'', text, { quoted: mek })
break
case 'ban':
client.updatePresence(from, Presence.composing)
if (args.length < 1) return
if (!isOwner) return reply(mess.only.ownerB)
mentioned = mek.message.extendedTextMessage.contextInfo.mentionedJid
ban = mentioned
reply(`berhasil banned : ${ban}`)
break
case 'addprem':
client.updatePresence(from, Presence.composing)
if (args.length < 1) return
if (!isOwner) return reply(mess.only.ownerB)
mentioned = mek.message.extendedTextMessage.contextInfo.mentionedJid
premium = mentioned
reply(`berhasil Menambahkan ${premium} Untuk User Premium`)
break
case 'removeprem'
if (!isOwner)return reply(mess.only.ownerB)
rprem = body.slice(13)
premium.splice(`${rprem}@s.whatsapp.net`, 1)
fs.writeFileSync('./database/json/premium.json', JSON.stringify(premium))
reply(`Berhasil Remove wa.me/${rprem} Dari User Premium`)
break
case 'unban':
if (!isOwner)return reply(mess.only.ownerB)
bnnd = body.slice(8)
ban.splice(`${bnnd}@s.whatsapp.net`, 1)
fs.writeFileSync('./database/json/banned.json', JSON.stringify(ban))
reply(`Nomor wa.me/${bnnd} telah di unban!`)
break
case 'block':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
client.updatePresence(from, Presence.composing)
client.chatRead (from)
if (!isGroup) return reply(mess.only.group)
if (!isOwner) return reply(mess.only.ownerB)
client.blockUser (`${body.slice(7)}@c.us`, "add")
client.sendMessage(from, `perintah Diterima, memblokir ${body.slice(7)}@c.us`, text)
break
case 'unblock':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
if (!isGroup) return reply(mess.only.group)
if (!isOwner) return reply(mess.only.ownerB)
client.blockUser (`${body.slice(9)}@c.us`, "remove")
client.sendMessage(from, `perintah Diterima, membuka blokir ${body.slice(9)}@c.us`, text)
break
case 'ownergrup':
case 'ownergroup':
client.updatePresence(from, Presence.composing)
options = {
text: `Owner Group ini adalah : @${from.split("-")[0]}`,
contextInfo: { mentionedJid: [from] }
}
client.sendMessage(from, options, text, { quoted: mek } )
break
case 'leave':
if (!isGroup) return reply(mess.only.group)
if (!isOwner) return reply(mess.only.ownerB)
anu = await client.groupLeave(from, `Bye All Member *${groupMetadata.subject}*`, groupId)
break
case 'getses':
if (!isOwner) return client.reply(from, 'Perintah ini hanya untuk Owner bot', id)
const sesPic = await client.getSnapshot()
client.sendFile(from, sesPic, 'session.png', 'Neh...', id)
break
case 'setname':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
if (!isGroup) return reply(mess.only.group)
if (!isGroupAdmins) return reply(mess.only.admin)
if (!isBotGroupAdmins) return reply(mess.only.Badmin)
client.groupUpdateSubject(from, `${body.slice(9)}`)
client.sendMessage(from, `\`\`\`✓Sukses Mengganti Nama Group Menjadi\`\`\` *${body.slice(9)}*`, text, {quoted: mek})
break
case 'setdesc':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
if (!isGroup) return reply(mess.only.group)
if (!isGroupAdmins) return reply(mess.only.admin)
if (!isBotGroupAdmins) return reply(mess.only.Badmin)
client.groupUpdateDescription(from, `${body.slice(9)}`)
client.sendMessage(from, `\`\`\`✓Sukses Mengganti Deskripsi Group\`\`\` *${groupMetadata.subject}* Menjadi: *${body.slice(9)}*`, text, {quoted: mek})
break
case 'tts':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
if (args.length < 1) return client.sendMessage(from, 'Kode bahasanya mana gan?\n Kalo Gatau Kode Bahasanya Apa Aja Ketik Saja *${prefix}bahasa*', text, {quoted: mek})
const gtts = require('./lib/gtts')(args[0])
if (args.length < 2) return client.sendMessage(from, 'Textnya mana gan?', text, {quoted: mek})
dtt = body.slice(9)
ranm = getRandom('.mp3')
rano = getRandom('.ogg')
dtt.length > 600
? reply('Textnya kebanyakan gan')
: gtts.save(ranm, dtt, function() {
exec(`ffmpeg -i ${ranm} -ar 48000 -vn -c:a libopus ${rano}`, (err) => {
fs.unlinkSync(ranm)
buff = fs.readFileSync(rano)
if (err) return reply('Gagal gan:(')
reply(mess.wait)
client.sendMessage(from, buff, audio, {quoted: mek, ptt:true})
fs.unlinkSync(rano)
})
})
break
case 'translate':
case 'translete':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
if (args.length < 1) return client.sendMessage(from, 'Kode Bahasanya???', text, {quoted: mek})
if (args.length < 2) return client.sendMessage(from, 'Text Yg Mau Di translate??', text, {quoted: mek})
ts = body.slice(11)
kode = ts.split("/")[0]
teks = ts.split("/")[1]
anu = await fetchJson(`https://arugaz.my.id/api/edu/translate?lang=${kode}&text=${teks}`)
reply(mess.wait)
translate = `Text Asli: *${body.slice(11)}*\n\nHasil: *${anu.text}*`
client.sendMessage(from, translate, text, {quoted: mek})
break
case 'ts':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
if (args.length < 1) return client.sendMessage(from, 'Kode Bahasanya???', text, {quoted: mek})
if (args.length < 2) return client.sendMessage(from, 'Text Yg Mau Di translate??', text, {quoted: mek})
ts = body.slice(4)
kode = ts.split("/")[0]
teks = ts.split("/")[1]
anu = await fetchJson(`https://arugaz.my.id/api/edu/translate?lang=${kode}&text=${teks}`)
reply(mess.wait)
ts = `Text Asli: *${body.slice(7)}*\n\nHasil: *${anu.text}*`
client.sendMessage(from, ts, text, {quoted: mek})
break
case 'setpp':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
if (!isGroup) return reply(mess.only.group)
if (!isGroupAdmins) return reply(mess.only.admin)
if (!isBotGroupAdmins) return reply(mess.only.Badmin)
media = await client.downloadAndSaveMediaMessage(mek)
await client.updateProfilePicture (from, media)
reply(`\`\`\`✓Sukses Mengganti Profil Group\`\`\` *${groupMetadata.subject}*`)
break
case 'apakah':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
apakah = body.slice(1)
const apa =['Iya','Tidak','Bisa Jadi','Coba Ulangi']
const kah = apa[Math.floor(Math.random() * apa.length)]
client.sendMessage(from, 'Pertanyaan : *'+apakah+'*\n\nJawaban : '+ kah, text, { quoted: mek })
break
case 'rate':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
rate = body.slice(1)
const ra =['4','9','17','28','34','48','59','62','74','83','97','100','29','94','75','82','41','39']
const te = ra[Math.floor(Math.random() * ra.length)]
client.sendMessage(from, 'Pertanyaan : *'+rate+'*\n\nJawaban : '+ te+'%', text, { quoted: mek })
break
case 'watak':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
watak = body.slice(1)
const wa =['peny ayang','pem urah','Pem arah','Pem aaf','Pen urut','Ba ik','bap eran','Baik Hati','peny abar','Uw u','top deh, poko knya','Suka Memb antu']
const tak = wa[Math.floor(Math.random() * wa.length)]
client.sendMessage(from, 'Pertanyaan : *'+watak+'*\n\nJawaban : '+ tak, text, { quoted: mek })
break
case 'hobby':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
hobby = body.slice(1)
const hob =['Memasak','Membantu Atok','Mabar','Nobar','Sosmedtan','Membantu Orang lain','Nonton Anime','Nonton Drakor','Naik Motor','Nyanyi','Menari','Bertumbuk','Menggambar','Foto fotoan Ga jelas','Maen Game','Berbicara Sendiri']
const by = hob[Math.floor(Math.random() * hob.length)]
client.sendMessage(from, 'Pertanyaan : *'+hobby+'*\n\nJawaban : '+ by, text, { quoted: mek })
break
case 'bisakah':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
bisakah = body.slice(1)
const bisa =['Bisa','Tidak Bisa','Coba Ulangi']
const keh = bisa[Math.floor(Math.random() * bisa.length)]
client.sendMessage(from, 'Pertanyaan : *'+bisakah+'*\n\nJawaban : '+ keh, text, { quoted: mek })
break
case 'kapankah':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
kapankah = body.slice(1)
const kapan =['Besok','Lusa','Tadi','4 Hari Lagi','5 Hari Lagi','6 Hari Lagi','1 Minggu Lagi','2 Minggu Lagi','3 Minggu Lagi','1 Bulan Lagi','2 Bulan Lagi','3 Bulan Lagi','4 Bulan Lagi','5 Bulan Lagi','6 Bulan Lagi','1 Tahun Lagi','2 Tahun Lagi','3 Tahun Lagi','4 Tahun Lagi','5 Tahun Lagi','6 Tahun Lagi','1 Abad lagi','3 Hari Lagi']
const koh = kapan[Math.floor(Math.random() * kapan.length)]
client.sendMessage(from, 'Pertanyaan : *'+kapankah+'*\n\nJawaban : '+ koh, text, { quoted: mek })
break
case 'truth':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
const trut =['Pernah suka sama siapa aja? berapa lama?','Kalau boleh atau kalau mau, di gc/luar gc siapa yang akan kamu jadikan sahabat?(boleh beda/sma jenis)','apa ketakutan terbesar kamu?','pernah suka sama orang dan merasa orang itu suka sama kamu juga?','Siapa nama mantan pacar teman mu yang pernah kamu sukai diam diam?','pernah gak nyuri uang nyokap atau bokap? Alesanya?','hal yang bikin seneng pas lu lagi sedih apa','pernah cinta bertepuk sebelah tangan? kalo pernah sama siapa? rasanya gimana brou?','pernah jadi selingkuhan orang?','hal yang paling ditakutin','siapa orang yang paling berpengaruh kepada kehidupanmu','hal membanggakan apa yang kamu dapatkan di tahun ini','siapa orang yang bisa membuatmu sange','siapa orang yang pernah buatmu sange','(bgi yg muslim) pernah ga solat seharian?','Siapa yang paling mendekati tipe pasangan idealmu di sini','suka mabar(main bareng)sama siapa?','pernah nolak orang? alasannya kenapa?','Sebutkan kejadian yang bikin kamu sakit hati yang masih di inget','pencapaian yang udah didapet apa aja ditahun ini?','kebiasaan terburuk lo pas di sekolah apa?']
const ttrth = trut[Math.floor(Math.random() * trut.length)]
truteh = await getBuffer(`https://i.ibb.co/305yt26/bf84f20635dedd5dde31e7e5b6983ae9.jpg`)
client.sendMessage(from, truteh, image, { caption: '*Truth*\n\n'+ ttrth, quoted: mek })
break
case 'dare':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
const dare =['Kirim pesan ke mantan kamu dan bilang "aku masih suka sama kamu','telfon crush/pacar sekarang dan ss ke pemain','pap ke salah satu anggota grup','Bilang "KAMU CANTIK BANGET NGGAK BOHONG" ke cowo','ss recent call whatsapp','drop emot "🦄💨" setiap ngetik di gc/pc selama 1 hari','kirim voice note bilang can i call u baby?','drop kutipan lagu/quote, terus tag member yang cocok buat kutipan itu','pake foto sule sampe 3 hari','ketik pake bahasa daerah 24 jam','ganti nama menjadi "gue anak lucinta luna" selama 5 jam','chat ke kontak wa urutan sesuai %batre kamu, terus bilang ke dia "i lucky to hv you','prank chat mantan dan bilang " i love u, pgn balikan','record voice baca surah al-kautsar','bilang "i hv crush on you, mau jadi pacarku gak?" ke lawan jenis yang terakhir bgt kamu chat (serah di wa/tele), tunggu dia bales, kalo udah ss drop ke sini','sebutkan tipe pacar mu!','snap/post foto pacar/crush','teriak gajelas lalu kirim pake vn kesini','pap mukamu lalu kirim ke salah satu temanmu','kirim fotomu dengan caption, aku anak pungut','teriak pake kata kasar sambil vn trus kirim kesini','teriak " anjimm gabutt anjimmm " di depan rumah mu','ganti nama jadi " BOWO " selama 24 jam','Pura pura kerasukan, contoh : kerasukan maung, kerasukan belalang, kerasukan kulkas, dll']
const der = dare[Math.floor(Math.random() * dare.length)]
tod = await getBuffer(`https://i.ibb.co/305yt26/bf84f20635dedd5dde31e7e5b6983ae9.jpg`)
client.sendMessage(from, tod, image, { quoted: mek, caption: '*Dare*\n\n'+ der })
break
case 'speed':
case 'ping':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
const timestamp = speed();
const latensi = speed() - timestamp
client.sendMessage(from, `Speed: ${latensi.toFixed(4)} _Second_`, text, { quoted: mek})
break
case 'tagme':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
var nom = mek.participant
const tag = {
text: `@${nom.split("@s.whatsapp.net")[0]} tag!`,
contextInfo: { mentionedJid: [nom] }
}
client.sendMessage(from, tag, text, {quoted: mek})
break
case 'lirik':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
reply(mess.wait)
teks = body.slice(7)
anu = await fetchJson(`http://scrap.terhambar.com/lirik?word=${teks}`, {method: 'get'})
reply('Lirik dari lagu '+teks+' adalah :\n\n'+anu.result.lirik)
break
case 'report':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
const pesan = body.slice(8)
if (pesan.length > 300) return client.sendMessage(from, 'Maaf Teks Terlalu Panjang, Maksimal 300 Teks', text, {quoted: mek})
var nomor = mek.participant
const teks1 = `*[REPORT]*\nNomor : @${nomor.split("@s.whatsapp.net")[0]}\nPesan : ${pesan}`
var options = {
text: teks1,
contextInfo: {mentionedJid: [nomor]},
}
client.sendMessage('[email protected]', options, text, {quoted: mek})
reply('Masalah telah di laporkan ke owner BOT, laporan palsu/main2 tidak akan ditanggapi.')
break
case 'request':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
const cfrr = body.slice(8)
if (cfrr.length > 300) return client.sendMessage(from, 'Maaf Teks Terlalu Panjang, Maksimal 300 Teks', text, {quoted: mek})
var nomor = mek.participant
const ress = `*[REQUEST VITUR]*\nNomor : @${nomor.split("@s.whatsapp.net")[0]}\nPesan : ${cfrr}`
var options = {
text: ress,
contextInfo: {mentionedJid: [nomor]},
}
client.sendMessage('[email protected]', options, text, {quoted: mek})
reply('REQUEST ANDA TELAH SAMPAI ke owner BOT, Requests palsu/main2 tidak akan ditanggapi.')
break
case 'meme':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
reply(mess.wait)
meme = await kagApi.memes()
buffer = await getBuffer(`https://imgur.com/${meme.hash}.jpg`)
client.sendMessage(from, buffer, image, {quoted: mek, caption: '.......'})
break
case 'memeindo':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
reply(mess.wait)
memein = await fetchJson(`https://api.zeks.xyz/api/memeindo?apikey=${ZeksApi}`)
buffer = await getBuffer(memein.result)
client.sendMessage(from, buffer, image, {quoted: mek, caption: '.......'})
break
case 'ssweb':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
if (args.length < 1) return reply('Urlnya mana gan?')
teks = body.slice(7)
reply(mess.wait)
anu = await fetchJson(`https://mnazria.herokuapp.com/api/screenshotweb?url=${teks}`)
ssweb = await getBuffer(anu.gambar)
client.sendMessage(from, ssweb, image, {quoted: mek})
break
case 'nsfwloli':
try {
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
if (!isNsfw) return reply(' *FALSE* ')
res = await fetchJson(`https://tobz-api.herokuapp.com/api/randomloli?apikey=${TobzApi}`, {method: 'get'})
buffer = await getBuffer(res.result)
client.sendMessage(from, buffer, image, {quoted: mek, caption: 'Jangan jadiin bahan buat comli om'})
} catch (e) {
console.log(`Error :`, color(e,'red'))
reply(' *ERROR* ')
}
break
case 'nsfwblowjob':
try {
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
if (!isNsfw) return reply(' *FALSE* ')
res = await fetchJson(`https://tobz-api.herokuapp.com/api/nsfwblowjob?apikey=${TobzApi}`, {method: 'get'})
buffer = await getBuffer(res.result)
client.sendMessage(from, buffer, image, {quoted: mek, caption: 'Jangan jadiin bahan buat comli om'})
} catch (e) {
console.log(`Error :`, color(e,'red'))
reply(' *ERROR* ')
}
break
case 'nsfwneko':
try {
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
if (!isNsfw) return reply(' *FALSE* ')
res = await fetchJson(`https://tobz-api.herokuapp.com/api/nsfwneko?apikey=${TobzApi}`, {method: 'get'})
buffer = await getBuffer(res.result)
client.sendMessage(from, buffer, image, {quoted: mek, caption: 'ni anjim'})
} catch (e) {
console.log(`Error :`, color(e,'red'))
reply(' *ERROR* ')
}
break
case 'nsfwtrap':
try {
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
if (!isNsfw) return reply(' *FALSE* ')
res = await fetchJson(`https://tobz-api.herokuapp.com/api/nsfwtrap?apikey=${TobzApi}`, {method: 'get'})
buffer = await getBuffer(res.result)
client.sendMessage(from, buffer, image, {quoted: mek, caption: 'ni anjim'})
} catch (e) {
console.log(`Error :`, color(e,'red'))
reply(' *ERROR* ')
}
break
case 'hentai':
try {
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
if (!isNsfw) return reply(' *FALSE* ')
res = await fetchJson(`https://tobz-api.herokuapp.com/api/hentai?apikey=${TobzApi}`, {method: 'get'})
buffer = await getBuffer(res.result)
client.sendMessage(from, buffer, image, {quoted: mek, caption: 'ni anjim'})
} catch (e) {
console.log(`Error :`, color(e,'red'))
reply(' *ERROR* ')
}
break
case 'hilih':
if (isBanned) return reply(mess.only.benned)
if (!isUser) return reply(mess.only.userB)
reply(mess.wait)