forked from zikaudia/newatt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AQUA SUPREMACY.js
8642 lines (7583 loc) · 335 KB
/
AQUA SUPREMACY.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
//======================================
require("./config")
const {
BufferJSON,
WA_DEFAULT_EPHEMERAL,
downloadContentFromMessage,
delay,
useSingleFileAuthState,
generateWAMessageFromContent,
proto,
generateWAMessageContent,
WAProto,
Presence,
generateWAMessage,
prepareWAMessageMedia,
areJidsSameUser,
getContentType,
WAFlag
} = require('@adiwajshing/baileys')
const zmans = require("@adiwajshing/baileys")
const uber = require('uberduck-api')
const fs = require('fs')
const yts = require('yt-search');
const util = require('util')
const chalk = require('chalk')
const { exec, spawn, execSync } = require("child_process")
const axios = require('axios')
const ffmpeg = require('fluent-ffmpeg');
const xa = require('xfarr-api')
const { Youtube } = require('ytdownloader.js')
const { mediafire } = require('./funções de cmd/funções/mediafire')
const { imageToWebp, videoToWebp, writeExifImg, writeExifVid } = require('./funções/exif')
const { pornok, hentai } = require('./funções de cmd/funções/scraper')
const webp_mp4 = require("./funções de cmd/funções/webp_mp4.js");
const { validmove, setGame } = require('./funções de cmd/tictactoe');
const execute = util.promisify(require('child_process').exec)
const { pinterest } = require("./funções de cmd/funções/pinterest")
const { wallpaper } = require("./funções de cmd/funções/wallpaper")
const anime = JSON.parse(fs.readFileSync('./funções de cmd/funções/anime.json'))
const antiracismo = JSON.parse(fs.readFileSync('./funções de cmd/antis/antiracismo.json'))
const sotoy = JSON.parse(fs.readFileSync('./funções de cmd/funções/sotoy.json'));
const autoreact = JSON.parse(fs.readFileSync('./funções de cmd/funções/autoreact.json'))
const { palavrasANA } = require('./funções de cmd/funções/jogos.js');
const { infobemvindo } = require('./funções de cmd/funções/infobv.js');
const welcome_group2 = JSON.parse(fs.readFileSync('./funções de cmd/grupos/welcomegp2.json'));
const bye_group2 = JSON.parse(fs.readFileSync('./funções de cmd/grupos/byegp2.json'));
const welkom = JSON.parse(fs.readFileSync('./funções de cmd/grupos/welkom.json'));
const registros = JSON.parse(fs.readFileSync('./registros.json'));
const { TelegraPh } = require("./funções/uploader");
//=====================================
const xfar = require('xfarr-api');
const path = require('path')
const fetch = require('node-fetch')
const os = require('os')
const { TiktokDownloader } = require('./funções/tiktokdl')
const moment = require('moment-timezone')
const { JSDOM } = require('jsdom')
const speed = require('performance-now')
const hx = require('./funções/hxz-api')
const { TiktokDownloaderr } = require('./funções/tiktokmikudl');
const stalker = require("xzons-api")
const hxz = require('./funções/hxz-api')
const { Aki } = require('aki-api')
const { insert, response } = require('./funções de cmd/funções/simi.js');
//=====================================
const welkom2 = JSON.parse(fs.readFileSync('./funções de cmd/usuarios/vacilo.json'));
const { color, bgcolor } = require('./funções/color')
const { convertSticker } = require("./funções de cmd/funções/swm.js");
const tamat = JSON.parse(fs.readFileSync('./funções de cmd/funções/tamat.json'))
const countMessage = JSON.parse(fs.readFileSync('./funções de cmd/grupos/countmsg.json'));
const { conselhob } = require('./funções de cmd/funções/conselhob.js');
const { palavras } = require('./funções de cmd/funções/conselhos.js');
const { mediafireDl } = require('./funções/mediafire')
const adeuscara = JSON.parse(fs.readFileSync('./funções de cmd/grupos/adeuscara.json'));
//==========DIRETORIO DOS MENUS =============
const { menu } = require("./funções de cmd/menu/menu.js")
const { menudono } = require("./funções de cmd/menu/menudono.js")
const { menulogos } = require('./funções de cmd/menu/menulogos.js');
const { infodono } = require('./funções de cmd/menu/infodono.js');
const { menuadm } = require("./funções de cmd/menu/menuadm.js")
const { menuprem } = require('./funções de cmd/menu/menuprem.js');
const { alteradores } = require('./funções de cmd/menu/alteradores.js');
const { brincadeiras } = require('./funções de cmd/menu/brincadeiras.js');
const { sticker } = require('./funções de cmd/menu/sticker.js');
const { menuhentai } = require('./funções de cmd/menu/hentai.js');
//=====================================
const { EmojiAPI } = require("emoji-api")
const imgbbUploader = require('imgbb-uploader')
const { isLimit, getLimit, giveLimit, addBalance, kurangBalance, getBalance, isGame, gameAdd, givegame, cekGLimit } = require('./funções/limit.js');
const emoji = new EmojiAPI()
const usedCommandRecently = new Set()
const { getLevelingXp, getLevelingLevel, getLevelingId, Telesticker, addLevelingXp, addLevelingLevel, addLevelingId, smsg, tanggal, getExtension, formatDate, getTime, isUrl, sleep, clockString, runtime, fetchJson, getBuffer, jsonformat, format, parseMention, getGroupAdmins, getRandom } = require('./funções/myfunc')
const { aiovideodl } = require('./funções/scraper.js')
const cheerio = require ("cheerio");
const textpro = require('./funções/textpro')
const mimetype = require('mime-types')
const { segunPRONTOws } = require('./funções/segundo')
const { wikiSearch } = require('./funções/wiki.js');
const premium = JSON.parse(fs.readFileSync('./funções de cmd/usuarios/premium.json'));
const { upload, nit } = require('./funções de cmd/funções/tourl');
const { forwarding, imgnazista, imggay, imgcorno, imggostosa, imggostoso, imgfeio, imgvesgo, imgbebado, imggado, matarcmd, beijocmd, chutecmd, tapacmd } = require("./funções de cmd/nescessario.json")
//=====================================
const ms = require('ms')
let { covid } = require('./funções/covid.js')
const { yta, ytv, searchResult } = require('./funções/ytdl')
const forca = JSON.parse(fs.readFileSync('./funções/database/forca.json'))
const puppet = JSON.parse(fs.readFileSync('./funções/database/puppet_forca.json'))
//=====================================
fake = "AQUA ZIKA"
lolkey = global.lolhuman
keyapi = "key-licht-san-7" // https://manuella-api-pl.herokuapp.com
tohkapi = "Lichtzin" // https://tohka.tech
//=====================================
var prefix = global.prefix
NomeDoBot = global.NomeDoBot
numerodn = global.numerodonoa
NickDono = global.NickDono
banChats = global.banChats
logo = global.log0
//=====================================
let picaks = ['flamejante','flaming','flarun','flasmurf']
let picak = picaks[Math.floor(Math.random() * picaks.length)]
const meupirul = ['Hoje', 'Amanhã', 'Nunca', 'dia', 'semana', 'mês', 'ano']
const meupirul2 = ['dias', 'semanas', 'meses', 'anos']
//========CONST=============\\
const nsfw = JSON.parse(fs.readFileSync('./funções de cmd/grupos/nsfw.json'));
const { destrava, destrava2 } = require('./funções de cmd/funções/destrava.js');
const samih = JSON.parse(fs.readFileSync('./funções de cmd/usuarios/simi.json'));
const samih2 = JSON.parse(fs.readFileSync('./funções de cmd/funções/simi.json'));
const akinator = JSON.parse(fs.readFileSync('./funções de cmd/funções/akinator.json'))
let limit = JSON.parse(fs.readFileSync('./jogos-rpg/user/limit.json'));
let leveling = JSON.parse(fs.readFileSync('./funções de cmd/funções/leveling.json'))
let autosticker = JSON.parse(fs.readFileSync('./funções de cmd/funções/autosticker.json'));
const autostick = JSON.parse(fs.readFileSync('./funções de cmd/funções/autostickpc.json'))
let _level = JSON.parse(fs.readFileSync('./funções de cmd/funções/level.json'))
const joguinhodavelhajs = JSON.parse(fs.readFileSync('./funções de cmd/usuarios/joguinhodavelha.json'));
const joguinhodavelhajs2 = JSON.parse(fs.readFileSync('./funções de cmd/usuarios/joguinhodavelha2.json'));
//========COMEÇO ANTIS=============\\
const limitefll = JSON.parse(fs.readFileSync('./funções de cmd/usuarios/flood.json'));
const anticall = JSON.parse(fs.readFileSync('./funções de cmd/usuarios/anticall.json'));
const antifake = JSON.parse(fs.readFileSync('./funções de cmd/antis/antifake.json'))
const antilinkhard = JSON.parse(fs.readFileSync('./funções de cmd/antis/antilinkhard.json'))
const autofigu = JSON.parse(fs.readFileSync('./funções de cmd/grupos/autofigu.json'))
const antilinkgp = JSON.parse(fs.readFileSync('./funções de cmd/antis/antilinkgp.json'))
const antiporn = JSON.parse(fs.readFileSync('./funções de cmd/antis/antiporn.json'))
const antiimg = JSON.parse(fs.readFileSync('./funções de cmd/antis/antiimg.json'))
const antiflood = JSON.parse(fs.readFileSync('./funções de cmd/usuarios/antiflood.json'));
const antisticker = JSON.parse(fs.readFileSync('./funções de cmd/antis/antisticker.json'))
const antinotas = JSON.parse(fs.readFileSync('./funções de cmd/antis/antinotas.json'))
const antictt = JSON.parse(fs.readFileSync('./funções de cmd/antis/antictt.json'))
const anticatalogo = JSON.parse(fs.readFileSync('./funções de cmd/antis/anticatalogo.json'))
const antidoc = JSON.parse(fs.readFileSync('./funções de cmd/antis/antidoc.json'))
const antiloc = JSON.parse(fs.readFileSync('./funções de cmd/antis/antiloc.json'))
const antipv = JSON.parse(fs.readFileSync('./funções de cmd/usuarios/antipv.json'))
const antivid = JSON.parse(fs.readFileSync('./funções de cmd/antis/antivideo.json'))
const antiaudio = JSON.parse(fs.readFileSync('./funções de cmd/antis/antiaudio.json'))
const palavra = JSON.parse(fs.readFileSync('./funções de cmd/grupos/palavras.json'))
const muted = JSON.parse(fs.readFileSync('./funções de cmd/grupos/muted.json'))
const palavrao = JSON.parse(fs.readFileSync('./funções de cmd/grupos/palavrao.json'))
//========COMEÇO=============\\
module.exports = aqua = async (aqua, m, messages, store) => {
try {
const info = messages ? messages[0]: messages[1]
if (!info.message) return
if (info.key && info.key.remoteJid == 'status@broadcast') return
const altpdf = Object.keys(info.message)
const type = Object.keys(info.message)[0] == 'senderKeyDistributionMessage' ? Object.keys(info.message)[2] : (Object.keys(info.message)[0] == 'messageContextInfo') ? Object.keys(info.message)[1] : Object.keys(info.message)[0]
//==============(BODY)================\\
var body = (type === 'conversation') ? info.message.conversation : (type == 'imageMessage') ? info.message.imageMessage.caption : (type == 'videoMessage') ? info.message.videoMessage.caption : (type == 'extendedTextMessage') ? info.message.extendedTextMessage.text : (type == 'buttonsResponseMessage') ? info.message.buttonsResponseMessage.selectedButtonId : (type == 'listResponseMessage') ? info.message.listResponseMessage.singleSelectReply.selectedRowId : (type == 'templateButtonReplyMessage') ? info.message.templateButtonReplyMessage.selectedId : (type === 'messageContextInfo') ? (info.message.buttonsResponseMessage?.selectedButtonId || info.message.listResponseMessage?.singleSelectReply.selectedRowId || info.text) : ''
const args = body.trim().split(/ +/).slice(1)
const q = args.join(' ')
const isCmd = body.startsWith(prefix)
const command = isCmd ? body.slice(1).trim().split(/ +/).shift().toLocaleLowerCase() : null
//================(BADY)================\\
bady = (type === 'conversation') ? info.message.conversation : (type == 'imageMessage') ? info.message.imageMessage.caption : (type == 'videoMessage') ? info.message.videoMessage.caption : (type == 'extendedTextMessage') ? info.message.extendedTextMessage.text : (info.message.listResponseMessage && info.message.listResponseMessage.singleSelectReply.selectedRowId) ? info.message.listResponseMessage.singleSelectReply.selectedRowId: ''
//=======================================\\
bidy = bady.toLowerCase()
//===============(BUDY)==================\\
budy = (type === 'conversation') ? info.message.conversation : (type === 'extendedTextMessage') ? info.message.extendedTextMessage.text : ''
var budy2 = budy.toLowerCase().normalize('NFD').replace(/[\u0300-\u036f]/g, "");
//======================================\\
var pes = (type === 'conversation' && m.message.conversation) ? m.message.conversation : (type == 'imageMessage') && m.message.imageMessage.caption ? m.message.imageMessage.caption : (type == 'videoMessage') && m.message.videoMessage.caption ? m.message.videoMessage.caption : (type == 'extendedTextMessage') && m.message.extendedTextMessage.text ? m.message.extendedTextMessage.text : ''
//===========(ID DAS FIGUS)===========\\
const figura = Object.keys(m.message)[0] == "stickerMessage" ? m.message.stickerMessage.fileSha256.toString('base64') : ""
//=====================================\\
const listmsg = (from, title, desc, list) => {
po = aqua.prepareMessageFromContent(from, {"listMessage": {"title": title,"description": desc,"buttonText": "Escolha aqui","footerText": "Selecione","listType": 1,"sections": list}}, {})
return aqua.relayWAMessage(po, {waitForAck: true})
}
listmes = (type == 'listResponseMessage') ? info.message.listResponseMessage.title : ''
//========FORMAÇÕES/CONST)=============\\
const SoDono = [ ...global.numerodonoa].map(v => v.replace(/[^0-9]/g, '') + '@s.whatsapp.net').includes(m.sender)
const botNumber = aqua.user.id.split(':')[0]+'@s.whatsapp.net'
const itsMe = m.sender == botNumber ? true : false
const text = args.join(" ")
const from = m.key.remoteJid
const isGroup = from.endsWith('@g.us')
const quoted = m.quoted ? m.quoted : m
const mime = (quoted.msg || quoted).mimetype || ''
//========GRUPOS/CONST)=============\\
const groupMetadata = isGroup ? await aqua.groupMetadata(from) : ''
const participants = isGroup ? await groupMetadata.participants : ''
const groupName = isGroup ? groupMetadata.subject : ''
const sender = isGroup ? m.key.participant : m.key.remoteJid
const pushname = m.pushName ? m.pushName : ''
const messagesC = pes.slice(0).trim().split(/ +/).shift().toLowerCase()
const arg = body.substring(body.indexOf(' ') + 1)
const argss = body.split(/ +/g)
const testat = body
const ants = body
const groupDesc = isGroup ? groupMetadata.desc : ''
const groupMembers = isGroup ? groupMetadata.participants : ''
const groupAdmins = isGroup ? getGroupAdmins(groupMembers) : ''
//=======================================\\
const numerodono = [ ...global.numerodonoa].map(v => v.replace(/[^0-9]/g, '') + '@s.whatsapp.net').includes(m.sender)
//============(SORTEIO-CONST)============\\
const isSimi = isGroup ? samih.includes(from) : false
const isSimi2 = isGroup ? samih2.includes(from) : false
//=======(ADMS/DONO/ETC..CONST)========\\
const isNsfw = isGroup ? nsfw.includes(from) : true
const isBot = m.key.fromMe ? true : false
const isPremium = premium.includes(sender)
const isBotAdmins = groupAdmins.includes(botNumber) || false
const isGroupAdmins = groupAdmins.includes(sender) || false
const isBotGroupAdmins = groupAdmins.includes(botNumber) || false
//==============================
const welcm = isGroup ? wlcm.includes(from) : true
const GcRvk = isGroup ? gcrevoke.includes(from) : false
const isLevelingOn = isGroup ? leveling.includes(from) : false
const isAutoStick = autostick.includes(from)
const isAutoSticker = isGroup ? autosticker.includes(from) : false
const content = JSON.stringify(m.message)
//================COMEÇO DOS ANTIS======================\\
//===========(ANTIS-PROTEÇÕES)===========\\
const isAntifake = isGroup ? antifake.includes(from) : false
const isRegistro = registros.includes(sender)
const isAntiCtt = isGroup ? antictt.includes(from) : false
const isAnticatalogo = isGroup ? anticatalogo.includes(from) : false
const isAntiFlood = isGroup ? antiflood.includes(from) : false
const isAntiLinkHard = isGroup ? antilinkhard.includes(from) : false
const isJoguin = isGroup ? joguinhodavelhajs.includes(sender) : false
const isleveling = isGroup ? leveling.includes(from) : false
const isAntilinkgp = isGroup ? antilinkgp.includes(from) : false
const isAntiPorn = isGroup ? antiporn.includes(from) : false
const isAntiAudio = isGroup ? antiaudio.includes(from) : false
const isAntiImg = isGroup ? antiimg.includes(from) : false
const isAntiSticker = isGroup ? antisticker.includes(from) : false
const isAntiNotas = isGroup ? antinotas.includes(from) : false
const Antidoc = isGroup ? antidoc.includes(from) : false
const Antiloc = isGroup ? antiloc.includes(from) : false
const isAntiVid = isGroup ? antivid.includes(from) : false
const isAutoReact = isGroup ? autoreact.includes(from) : false
const isWelkom2 = isGroup ? welkom2.includes(from) : true
const groupIdWelcomed2 = []
for(let obj of welcome_group2) groupIdWelcomed2.push(obj.id)
const groupIdBye2 = []
for(let obj of bye_group2) groupIdBye2.push(obj.id)
const isWelcomed2 = (groupIdWelcomed2.indexOf(from) >= 0) ? true : false
const isByed2 = (groupIdBye2.indexOf(from) >= 0) ? true : false
const isAntiPv = (antipv.indexOf('Ativado') >= 0) ? true : false
const isAnticall = (anticall.indexOf('Ativado') >= 0) ? true : false
const isPalavrao = isGroup ? palavrao.includes(from) : false
const isViewOnce = (type == 'viewOnceMessage')
const isWelkom = isGroup ? welkom.includes(from) : false
//=======================================\\
//=========(isQuoted/consts)=============\\
const isImage = type == 'imageMessage'
const isVideo = type == 'videoMessage'
const isAudio = type == 'audioMessage'
const isSticker = type == 'stickerMessage'
const isContact = type == 'contactMessage'
const isLocation = type == 'locationMessage'
const isProduct = type == 'productMessage'
const isMedia = (type === 'imageMessage' || type === 'videoMessage' || type === 'audioMessage')
typeMessage = body.substr(0, 50).replace(/\n/g, '')
if (isImage) typeMessage = "Image"
else if (isVideo) typeMessage = "Video"
else if (isAudio) typeMessage = "Audio"
else if (isSticker) typeMessage = "Sticker"
else if (isContact) typeMessage = "Contact"
else if (isLocation) typeMessage = "Location"
else if (isProduct) typeMessage = "Product"
const isQuotedMsg = type === 'extendedTextMessage' && content.includes('textMessage')
const isQuotedImage = type === 'extendedTextMessage' && content.includes('imageMessage')
const isQuotedVideo = type === 'extendedTextMessage' && content.includes('videoMessage')
const isQuotedDocument = type === 'extendedTextMessage' && content.includes('documentMessage')
const isQuotedAudio = type === 'extendedTextMessage' && content.includes('audioMessage')
const isQuotedSticker = type === 'extendedTextMessage' && content.includes('stickerMessage')
const isQuotedContact = type === 'extendedTextMessage' && content.includes('contactMessage')
const isQuotedLocation = type === 'extendedTextMessage' && content.includes('locationMessage')
const isQuotedProduct = type === 'extendedTextMessage' && content.includes('productMessage')
//==========================================\\
selectedButton = (type == 'buttonsResponseMessage') ? m.message.buttonsResponseMessage.selectedButtonId : ''
//==========================================\\
const argsButton = selectedButton.trim().split(/ +/)
//==========================================\\
const getFileBuffer = async (mediakey, MediaType) => {
const stream = await downloadContentFromMessage(mediakey, MediaType)
let buffer = Buffer.from([])
for await(const chunk of stream) {
buffer = Buffer.concat([buffer, chunk])
}
return buffer
}
try {
ppimg = await aqua.profilePictureUrl(sender)
} catch {
ppimg = 'https://i0.wp.com/www.gambarunik.id/wp-content/uploads/2019/06/Top-Gambar-Foto-Profil-Kosong-Lucu-Tergokil-.jpg'
}
const userppbuff = await getBuffer(ppimg)
const sendSticker = (from, filename, m) => {
aqua.sendMessage(from, {sticker: filename}, {quoted: selo})
}
const sendImage = (ytb) => {
aqua.sendMessage(from, {image: ytb}, {quoted: selo})
}
const sendMess = (hehe, ytb) => {
aqua.sendMessage(hehe, {text: ytb})
}
const pickRandom = (arr) => {
return arr[Math.floor(Math.random() * arr.length)]
}
const mentions = (teks, memberr, id) => {
(id == null || id == undefined || id == false) ? aqua.sendMessage(from, {text: teks.trim(), mentions: memberr}) : aqua.sendMessage(from, {text: teks.trim(), mentions: memberr})
}
const costum = (pesan, tipe, target, target2) => {
aqua.sendMessage(from, pesan, tipe, {quoted: {key: {fromMe: false, participant: `${target}`, ...(from ? {remoteJid: from}: {})}, message: {conversation: `${target2}` }}})
}
const sendlistA = async (id, txt1, txt2, title1, btext, but) => {
const sections = but
const listMessage = {
text: txt1,
footer: txt2,
title: title1,
buttonText: btext,
sections
}
aqua.sendMessage(id, listMessage)
}
//=========HORAS=============
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)}H ${pad(minutes)}M ${pad(seconds)}S`
}
const time2 = moment().tz('America/Sao_Paulo').format('HH:mm:ss')
if(time2 > "00:00:00"){
var tempo = 'BOA MADRUGADA'
}
if(time2 > "05:30:00"){
var tempo = 'BOM DIA'
}
if(time2 > "12:00:00"){
var tempo = 'BOA TARDE'
}
if(time2 > "19:00:00"){
var tempo = 'BOA NOITE'
}
//========CONST DE SELO========================
var selo = {
key: {
fromMe: false,
"participant": "0@s.whatsapp.net",
"remoteJid": "120363022697760691@g.us"
},
"message": {
orderMessage: {
itemCount: 13000,
status: 200,
jpegThumbnail: fs.readFileSync('./mídia-ft-vd/fotos/deusa.jpg'),
surface: 200,
message: `🔹@Licht.Offc\n🔹@AquaBot.Wpp`,
orderTitle: 'AQUA BOT SUPREMACY',
sellerJid: '0@s.whatsapp.net'
}
},
contextInfo: {
"forwardingScore": 999,
"isForwarded": true
},
sendEphemeral: true
}
const reply = (texto) => {
aqua.sendMessage(from, { text: texto }, {quoted: selo}).catch(e => {
console.log(e)
})
}
//=====================================
aqua.createMessage = async (jidnya, kontennya, optionnya) => {
return await generateWAMessage(jidnya, kontennya, {...optionnya,userJid: aqua.authState.creds.me.id,upload: aqua.waUploadToServer})
}
//=====================================
function randomNomor(angka){
return Math.floor(Math.random() * angka) + 1
}
//=============DATA=============
const date = moment.tz('America/Sao_Paulo').format('DD/MM/YY');
const time = moment.tz('America/Sao_Paulo').format('HH:mm:ss');
const hora = moment.tz('America/Sao_Paulo').format('HH:mm:ss');
const dataa = moment.tz('America/Sao_Paulo').format('DD/MM/YY');
//=====================================
//===============INTERAÇÃO NO TERMUX=====================
// ❗𝙲𝙾𝙼𝙰𝙽𝙳𝙾 𝙽𝙾 𝙿𝚅❗
if (!isGroup && isCmd) console.log(
color('[💧] 𝐂𝐎𝐌𝐀𝐍𝐃𝐎 𝐍𝐎 𝐏𝐑𝐈𝐕𝐀𝐃𝐎 [💧]','red'),'\n',
color('⪼ NΙCK :','blue'),color(pushname,'cyan'),'\n',
color('⪼ CМD :','blue'),color(command,'cyan'),'\n',
color('⪼ HORA :','blue'),color(hora,'cyan'),'\n',
color('⪼ DAТA :','blue'),color(dataa,'cyan'),'\n')
// ❗𝙼𝙴𝙽𝚂𝙰𝙶𝙴𝙼 𝙽𝙾 𝙿𝚅❗
if (!isCmd && !isGroup) console.log(
color('[💧] 𝐌𝐄𝐍𝐒𝐀𝐆𝐄𝐌 𝐍𝐎 𝐏𝐑𝐈𝐕𝐀𝐃𝐎 [💧]','red'),'\n',
color('⪼ NICK :','blue'),color(pushname,'cyan'),'\n',
color('⪼ MSG :','blue'),color(budy,'cyan'),'\n',
color('⪼ HORA :','blue'),color(hora,'cyan'),'\n',
color('⪼ DATA :','blue'),color(dataa,'cyan'),'\n')
// ❗𝙲𝙾𝙼𝙰𝙽𝙳𝙾 𝙴𝙼 𝙶𝚁𝚄𝙿𝙾❗
if (isCmd && isGroup) console.log(
color('[💧] 𝐂𝐎𝐌𝐀𝐍𝐃𝐎 𝐄𝐌 𝐆𝐑𝐔𝐏𝐎 [💧]','red'),'\n',
color('⪼ GRUPO :','blue'),color(groupName,'cyan'),'\n',
color('⪼ NICK :','blue'),color(pushname,'cyan'),'\n',
color('⪼ CMD :','blue'),color(command,'cyan'),'\n',
color('⪼ HORA :','blue'),color(hora,'cyan'),'\n',
color('⪼ DATA :','blue'),color(dataa,'cyan'),'\n')
// ❗𝙼𝙴𝙽𝚂𝙰𝙶𝙴𝙼 𝙴𝙼 𝙶𝚁𝚄𝙿𝙾❗
if (!isCmd && isGroup) console.log(
color('[💧] 𝐌𝐄𝐍𝐒𝐀𝐆𝐄𝐌 𝐄𝐌 𝐆𝐑𝐔𝐏𝐎 [💧]','red'),'\n',
color('⪼ GRUPO :','blue'),color(groupName,'cyan'),'\n',
color('⪼ NICK :','blue'),color(pushname,'cyan'),'\n',
color('⪼ MSG :','blue'),color(budy,'cyan'),'\n',
color('⪼ HORA :','blue'),color(hora,'cyan'),'\n',
color('⪼ DATA :','blue'),color(dataa,'cyan'),'\n')
//=====================================
//=====================================
//===========(enviar.espere)=============\\
const { mensagens } = require('./funções de cmd/funções/aleatoria.js'); // caso queira Alterar ou Adicionar Mais Frases de Espera
const { sortear } = require('./funções de cmd/funções/aleatoria.js'); // Basta ir Neste Diretório, e Adicionar.
var enviarmen = mensagens[Math.floor(Math.random() * mensagens.length)]
//========================================\\
//=====================================
enviar = {
espere: `${enviarmen}`,
successo: '️[🌊] SUCESSO',
levelon: '[💧] SISTEMA DE NÍVEL ATIVADO',
leveloff: '[🩸] SISTEMA DE NÍVEL DESATIVADO',
levelnoton: '[💧] SISTEMA NÃO ESTA ATIVO [🩸]',
levelnol: '*error* 0 °-°',
error: {
stick: '*falhou, tente novamente ^_^*',
Iv: '[💠] LINK INVÁLIDO'
},
msg: {
grupo: '[❗] Este comando só pode ser usado em grupos! ❌',
premium: '[❗] ESTE PEDIDO É SO PARA *USUÁRIOS PREMIUMS*',
mod: `[❗] ESTE PEDIDO É ESPECÍFICO PARA USUARIO MOD ${global.NickDono}*`,
banido: '❌ Você foi banido de utilizar os comandos, entre em contato com o proprietário pra saber o porque ❌' ,
donosmt: '[❗] Este é um recurso especial para o proprietário ❌',
donosmt2: '[❗] Este é um recurso especial para o proprietário ❌',
registro: '[💧] Faça Seu Login, Para poder Utilizar Este Comando',
adm: '[❗] Este comando só pode ser usado por administradores de grupo! ❌',
Badmin: ' [❗] Este comando só pode ser usado quando o bot se torna administrador! ❌',
}
}
//=====================================
const sendBtext = async (id, text1, desc1, but = [], vr) => {
buttonMessage = {
text: text1,
footer: desc1,
buttons: but,
headerType: 1
}
aqua.sendMessage(id, buttonMessage, {quoted: vr})
}
//=====================================
const enviarbutao = (from, text, footer, buttons) => {
return aqua.sendMessage(from, { text: text, footer: footer, templateButtons: buttons, quoted: selo })
}
// PRA ENVIAR BOTÃO DE TEMPLATE
const sendBimgT = async (id, img1, text1, desc1, but = [], vr) => {
templateMessage = {
image: {url: img1},
caption: text1,
footer: desc1,
templateButtons: but,
}
aqua.sendMessage(id, templateMessage, {quoted: selo})
}
//====================================
const enviarimg = (imageDir, caption) => {
aqua.sendMessage(from, {
image: fs.readFileSync(imageDir),
caption: caption
})
}
// ENVIAR BOTÃO COM IMAGEM
const sendBimg = async (id, img1, text1, desc1, but = [], vr) => {
buttonMessage = {
image: {url: img1},
caption: text1,
footer: desc1,
buttons: but,
headerType: 4
}
aqua.sendMessage(id, buttonMessage, {quoted: vr})
}
//========AUTOFIGU-GP/AUTOFIGU-PV=============
const enviarfigu = async (figu, tag) => {
bla = fs.readFileSync(figu)
aqua.sendMessage(from, {sticker: bla}, {quoted: selo})
}
const enviarfiguUrl = async (link) => {
ranp = getRandom('.gif')
rano = getRandom('.webp')
ini_buffer = `${link}`
exec(`wget ${ini_buffer} -O ${ranp} && ffmpeg -i ${ranp} -vcodec libwebp -filter:v fps=fps=15 -lossless 1 -loop 0 -preset default -an -vsync 0 -s 320:320 ${rano}`, (err) => {
fs.unlinkSync(ranp)
buff = fs.readFileSync(rano)
aqua.sendMessage(from, {sticker: buff}, {quoted: selo}).catch(e => {
})
fs.unlinkSync(rano)
})
}
if(isAutoSticker && !m.key.fromMe && isGroup) {
async function autofiguf() {
await setTimeout(async() => {
if(budy.includes(`${prefix}sticker`) || budy.includes(`${prefix}s`) || budy.includes(`${prefix}stk`) || budy.includes(`${prefix}st`) || budy.includes(`${prefix}fsticker`) || budy.includes(`${prefix}f`) || budy.includes(`${prefix}fstiker`)) return
if(type === "videoMessage") {
if ((isMedia && info.message.videoMessage.seconds < 40)){
rane = getRandom('.'+await getExtension(info.message.videoMessage.mimetype))
buffimg = await getFileBuffer(info.message.videoMessage, 'video')
fs.writeFileSync(rane, buffimg)
const media = rane
rano = getRandom('.webp')
await ffmpeg(`./${media}`)
.inputFormat(media.split('.')[1])
.on('start', function (cmd) {
console.log(`Started : ${cmd}`)
})
.on('error', function (err) {
console.log(`Error : ${err}`)
exec(`webpmux -set exif ${addMetadata('bot', 'deusa')} ${rano} -o ${rano}`, async (error) => {
fs.unlinkSync(media)
tipe = media.endsWith('.mp4') ? 'video' : 'gif'
reply(`Falha na conversão de ${tipe} para sticker`)
})
})
exec(`ffmpeg -i ${media} -vcodec libwebp -filter:v fps=fps=15 -lossless 1 -loop 0 -preset default -an -vsync 0 -s 200:200 ${rano}`, (err) => {
fs.unlinkSync(media)
buffer = fs.readFileSync(rano)
aqua.sendMessage(from, {sticker: buffer}, {quoted: selo})
fs.unlinkSync(rano)
})
}
}
if(type === "imageMessage") {
rane = getRandom('.'+await getExtension(info.message.imageMessage.mimetype))
buffimg = await getFileBuffer(info.message.imageMessage, 'image')
fs.writeFileSync(rane, buffimg)
const media = rane
rano = getRandom('.webp')
exec(`ffmpeg -i ${media} -vcodec libwebp -filter:v fps=fps=15 -lossless 1 -loop 0 -preset default -an -vsync 0 -s 800:800 ${rano}`, (err) => {
fs.unlinkSync(media)
buffer = fs.readFileSync(rano)
aqua.sendMessage(from, {sticker: buffer}, {quoted: selo})
fs.unlinkSync(rano)
})
}
}, 1000)
}
autofiguf().catch(e => {
console.log(e)
})
}
/*
if (isGroup && !m.key.fromMe && type == 'viewOnceMessage') {
let teks = `「 *ANTI VIEWONCE ATIVADO * 」
🤠 *NOME* : ${pushname}
👾 *USUÁRIO* : @${sender.split("@")[0]}
⏰ *Relógio* : ${moment.tz('America/Sao_Paulo').format('HH:mm:ss')}
💫 *MENSAGEM DENTRO* : ${type}`
reply(teks)
await sleep(500)
m.copyNForward(from, true, {
readViewOnce: true
}, {
quoted: selo
}).catch(_ => reply(`ERROOO`))
}
*/
//=====================================
/*
if (isAutoStick && isGroup) {
if(type == "imageMessage") {
await aqua.sendImageAsSticker(from, m, {packname: global.packname, author: global.author })
console.log(`DETECTADO AUTOSTICKER `)
} else if(type == "videoMessage") {
await aqua.sendVideoAsSticker(from, m, {packname: global.packname, author: global.author })
}
}
*/
//=====================================
if(isAutoReact && isGroup && isCmd) {
if(!isAutoReact) return
emojis = ["😀", "😃", "😁", "😆", "😂", "🤣", "😭", "😉", "😘", "😗", "🥰", "😍", "🤩", "🥳", "🙃", "🙂", "🥲", "😋", "😛", "😜", "😝", "😜", "😇", "😊", "☺️", "😏", "😌", "😔", "😑", "😐", "😶", "🤔", "🤫", "🤭", "🥱", "🤗", "🤨", "🧐", "😒", "🙄", "😤", "😠", "🤬", "🥺", "😥", "😟", "☹️", "😦", "😧", "😰", "😨", "😕", "😯", "😲", "😳", "🤯", "😬", "😓", "😓", "😞", "😖", "🥴", "😎", "🤓", "😎", "🥵", "🥶", "🌞", "🤢", "🤮", "🤥", "🤡", "😈", "🥵", "👽", "😷", "💦", "👺", "👹", "💨", "😸", "😹", "❤️", "🫀", "👁️", "☠️", "💀", "👀", "😻", "💋", "🫂", "👄", "👅", "💅", "🙏", "🤳", "✍️", "🙅", "🌀", "☃️", "🔥", "⚡", "🌈", "💧", "🙈", "🍑", "🍒", "🍓", "🍌", "🌶️", "🍆", "🍴", "🍷", "🍴", "🍽️", "🛢️", "🚨", "🎤", "🎭", "📽️", "🎰", "☎️", "📞", "👑", "💎", "💍", "💉", "🗑️", "🗡️", "⚔️", "🚬", "💣", "⁉️", "✅", "👁️🗨️", "♥️", "🧡", "💛", "💚", "💙", "💜", "🤎", "🖤", "🤍", "🇧🇷", "🏳️🌈", "🇲🇽", "🇪🇸", "🇲🇿", "🇦🇴", "🇺🇲","🤔","🤫","😏","🍆","👺","🙊"]
reassao = emojis[Math.floor(Math.random() * emojis.length)]
sendMsg = await aqua.sendMessage(from, {react: {text: reassao, key: m.key}})
}
if(isAutoReact && isGroup && !isCmd) {
if(!isAutoReact) return
emojis = ["😀", "😃", "😁", "😆", "😂", "🤣", "😭", "😉", "😘", "😗", "🥰", "😍", "🤩", "🥳", "🙃", "🙂", "🥲", "😋", "😛", "😜", "😝", "😜", "😇", "😊", "☺️", "😏", "😌", "😔", "😑", "😐", "😶", "🤔", "🤫", "🤭", "🥱", "🤗", "🤨", "🧐", "😒", "🙄", "😤", "😠", "🤬", "🥺", "😥", "😟", "☹️", "😦", "😧", "😰", "😨", "😕", "😯", "😲", "😳", "🤯", "😬", "😓", "😓", "😞", "😖", "🥴", "😎", "🤓", "😎", "🥵", "🥶", "🌞", "🤢", "🤮", "🤥", "🤡", "😈", "🥵", "👽", "😷", "💦", "👺", "👹", "💨", "😸", "😹", "❤️", "🫀", "👁️", "☠️", "💀", "👀", "😻", "💋", "🫂", "👄", "👅", "💅", "🙏", "🤳", "✍️", "🙅", "🌀", "☃️", "🔥", "⚡", "🌈", "💧", "🙈", "🍑", "🍒", "🍓", "🍌", "🌶️", "🍆", "🍴", "🍷", "🍴", "🍽️", "🛢️", "🚨", "🎤", "🎭", "📽️", "🎰", "☎️", "📞", "👑", "💎", "💍", "💉", "🗑️", "🗡️", "⚔️", "🚬", "💣", "⁉️", "✅", "👁️🗨️", "♥️", "🧡", "💛", "💚", "💙", "💜", "🤎", "🖤", "🤍", "🇧🇷", "🏳️🌈", "🇲🇽", "🇪🇸", "🇲🇿", "🇦🇴", "🇺🇲","🤔","🤫","😏","🍆","👺","🙊"]
reassao = emojis[Math.floor(Math.random() * emojis.length)]
sendMsg = await aqua.sendMessage(from, {react: {text: reassao, key: m.key}})
}
//=======================\\
//=====================================
//////////_FUNÇÕES DO JOGO DA VELHA_//////
async function joguinhodavelha() {
if(joguinhodavelhajs2.includes(from) || joguinhodavelhajs.includes(sender)) {
const cmde = body.toLowerCase().split(" ")[0] || "";
let arrNum = ["1", "2", "3", "4", "5", "6", "7", "8", "9"];
if (fs.existsSync(`./funções de cmd/tictactoe/db/${from}.json`)) {
const boardnow = setGame(`${from}`);
if (body == "Cex") return reply("why");
if (
body.toLowerCase() == "s" ||
body.toLowerCase() == "sim" ||
body.toLowerCase() == "ok"
) {
if (boardnow.O == sender.replace("@s.whatsapp.net", "")) {
if (boardnow.status)
return reply(`O jogo já começou antes!`);
const matrix = boardnow._matrix;
boardnow.status = true;
fs.writeFileSync(`./funções de cmd/tictactoe/db/${from}.json`,
JSON.stringify(boardnow, null, 2)
);
const chatAccept = `*🎮Ꮐ̸Ꭺ̸Ꮇ̸Ꭼ̸ Ꭰ̸Ꭺ̸ Ꮩ̸Ꭼ̸Ꮮ̸Ꮋ̸Ꭺ̸🕹️*
❌ : @${boardnow.X}
⭕ : @${boardnow.O}
Sua vez... : @${boardnow.turn == "X" ? boardnow.X : boardnow.O}
${matrix[0][0]} ${matrix[0][1]} ${matrix[0][2]}
${matrix[1][0]} ${matrix[1][1]} ${matrix[1][2]}
${matrix[2][0]} ${matrix[2][1]} ${matrix[2][2]}
`;
aqua.sendMessage(from, {text: chatAccept}, {quoted: selo,
contextInfo: {
mentionedJid: [
boardnow.X + "@s.whatsapp.net",
boardnow.O + "@s.whatsapp.net",
],
},
});
}
} else if (
body.toLowerCase() == "n" ||
body.toLowerCase() == "não" ||
body.toLowerCase() == "no"
) {
if (boardnow.O == sender.replace("@s.whatsapp.net", "")) {
if (boardnow.status)
return reply(`O jogo já começou!`);
fs.unlinkSync(`./funções de cmd/tictactoe/db/${from}.json`);
aqua.sendMessage(from, {text:
`@${boardnow.X} *_Infelizmente seu oponente não aceitou o desafio ❌😕_*`}, {quoted: selo,
contextInfo: {
mentionedJid: [boardnow.X + "@s.whatsapp.net"],
},
}
);
joguinhodavelhajs.splice([])
fs.writeFileSync('./funções de cmd/usuarios/joguinhodavelha.json', JSON.stringify(joguinhodavelhajs))
joguinhodavelhajs2.splice([])
fs.writeFileSync('./funções de cmd/usuarios/joguinhodavelha2.json', JSON.stringify(joguinhodavelhajs2))
}
}
}
if (arrNum.includes(cmde)) {
const boardnow = setGame(`${from}`);
if (!boardnow.status) return reply(`Parece que seu oponente não aceitou o desafio ainda...`)
if (
(boardnow.turn == "X" ? boardnow.X : boardnow.O) !=
sender.replace("@s.whatsapp.net", "")
)
return;
const moving = validmove(Number(body), `${from}`);
const matrix = moving._matrix;
if (moving.isWin) {
if (moving.winner == "SERI") {
const chatEqual = `*🎮Ꮐ̸Ꭺ̸Ꮇ̸Ꭼ̸ Ꭰ̸Ꭺ̸ Ꮩ̸Ꭼ̸Ꮮ̸Ꮋ̸Ꭺ̸🕹️*
Jogo termina empatado 😐
`;
reply(chatEqual);
fs.unlinkSync(`./funções de cmd/tictactoe/db/${from}.json`);