-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
2327 lines (2171 loc) · 106 KB
/
main.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
/////SI EDITAS DEJA CRÉDITOS
////BOT CREADO POR CONFU
////ALGUNAS FUNCIONES PERTENECEN A BOTS CREADOS POR CONFUMODS Y ALGUNOS POR ZEEONEOFC
////SI EDITAS DEJA CRÉDITOS
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\\
//
//
//
//
//
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\\
require('./config')
const { BufferJSON, WA_DEFAULT_EPHEMERAL, generateWAMessageFromContent, proto, generateWAMessageContent, generateWAMessage, prepareWAMessageMedia, areJidsSameUser, getContentType } = require('@adiwajshing/baileys')
const fs = require('fs')
const util = require('util')
const chalk = require('chalk')
const { exec, spawn, execSync } = require("child_process")
const axios = require('axios')
const hx = require('hxz-api')
const xfar = require('xfarr-api')
const ra = require('ra-api')
const kotz = require('kotz-api')
const yts = require("yt-search")
const path = require('path')
const os = require('os')
const antilink = JSON.parse(fs.readFileSync('./database/antilink.json'))
/*const ameClient = require("amethyste-api")
const ameApi = new ameClient("1f486b04b157f12adf0b1fe0bd83c92a28ce768683871d2a390e25614150d0c8fa404fd01b82a5ebf5b82cbfa22e365e611c8501225a93d5d1e87f9f420eb91b")*/
const moment = require('moment-timezone')
const speed = require('performance-now')
const Instagram = require('instagram-web-api')
const { performance } = require('perf_hooks')
const { Primbon } = require('scrape-primbon')
const { menu } = require("./src/help.js")
const primbon = new Primbon()
const { smsg, formatp, tanggal, formatDate, getTime, isUrl, sleep, clockString, runtime, fetchJson, getBuffer, jsonformat, format, parseMention, getRandom } = require('./lib/myfunc')
/*const { setppig, login, logout, upinstastory, follow, unfollow, likepost, unlikepost } = require('./lib/handlerIG')*/
apikeys = ['jAICsHSF','HsfUcTFC','mVxSgrfA','kN99U7dX','bBaPNMf7','A85dVx8b','oLfitSmT','EiEr76KW','xqGysIm2','2o4XWgTa','aSQkEYvl','wEyxHNtS','9lmpClQs','Jq7Ema8P','VyJA28kT','iEFPEC54','dLnRSVij','cXuE2QiG','RarjiwMZ','xm2wbMvA','edqQMbF9','5Zj8CAyC','hJhR3dAj','yVVKo9Nj','GHimzwCh']
let apialpha = apikeys[Math.floor(Math.random() * apikeys.length)]
//━━━━━━━━━━━━━━━[ DATABASE ]━━━━━━━━━━━━━━━\\
global.db = JSON.parse(fs.readFileSync('./src/database.json'))
if (global.db) global.db = {
sticker: {},
database: {},
game: {},
others: {},
...(global.db || {})
}
//━━━━━━━━━━━━━━━[ DATABASE.DB ]━━━━━━━━━━━━━━━\\
let tebaklagu = db.game.tebaklagu = []
let _family100 = db.game.family100 = []
let kuismath = db.game.math = []
let tebakgambar = db.game.tebakgambar = []
let tebakkata = db.game.tebakkata = []
let caklontong = db.game.lontong = []
let caklontong_desk = db.game.lontong_desk = []
let tebakkalimat = db.game.kalimat = []
let tebaklirik = db.game.lirik = []
let tebaktebakan = db.game.tebakan = []
let vote = db.others.vote = []
module.exports = cnf = async (cnf, m, msg, M, chatUpdate, store) => {
try {
var body = (m.mtype === 'conversation') ? m.message.conversation : (m.mtype == 'imageMessage') ? m.message.imageMessage.caption : (m.mtype == 'videoMessage') ? m.message.videoMessage.caption : (m.mtype == 'extendedTextMessage') ? m.message.extendedTextMessage.text : (m.mtype == 'buttonsResponseMessage') ? m.message.buttonsResponseMessage.selectedButtonId : (m.mtype == 'listResponseMessage') ? m.message.listResponseMessage.singleSelectReply.selectedRowId : (m.mtype == 'templateButtonReplyMessage') ? m.message.templateButtonReplyMessage.selectedId : (m.mtype === 'messageContextInfo') ? (m.message.buttonsResponseMessage?.selectedButtonId || m.message.listResponseMessage?.singleSelectReply.selectedRowId || m.text) : ''
var budy = (typeof m.text == 'string' ? m.text : '')
var prefix = prefa ? /^[°•π÷׶∆£¢€¥®™+✓_=|~!?@#$%^&.©^]/gi.test(body) ? body.match(/^[°•π÷׶∆£¢€¥®™+✓_=|~!?@#$%^&.©^]/gi)[0] : "" : prefa ?? global.prefix
const isCmd = body.startsWith(prefix)
const command = body.replace(prefix, '').trim().split(/ +/).shift().toLowerCase()
const args = body.trim().split(/ +/).slice(1)
const pushname = m.pushName || "No Name"
const botNumber = await cnf.decodeJid(cnf.user.id)
const isCreator = [botNumber, ...global.owner].map(v => v.replace(/[^0-9]/g, '') + '@s.whatsapp.net').includes(m.sender)
const itsMe = m.sender == botNumber ? true : false
const text = q = args.join(" ")
const quoted = m.quoted ? m.quoted : m
const mime = (quoted.msg || quoted).mimetype || ''
const isMedia = /image|video|sticker|audio/.test(mime)
////////////////////////////////////////////////////
const textImg = (teks, buffer = fs.readFileSync(global.fakeImg), msg, men) => {
cnf.sendMessage(m.chat, { text: teks, jpegThumbnail: buffer, mention: men ? men : [] }, { quoted: msg ? mess : msg })
}
const sendFile = async (from, url, caption, msg, men) => {
let mime = '';
let res = await axios.head(url)
mime = res.headers['content-type']
if (mime.split("/")[1] === "gif") {
return cnf.sendMessage(from, { video: await convertGif(url), caption: caption, gifPlayback: true, mentions: men ? men : []}, {quoted: msg})
}
let type = mime.split("/")[0]+"Message"
if(mime.split("/")[0] === "image"){
return cnf.sendMessage(from, { image: await getBuffer(url), caption: caption, mentions: men ? men : []}, {quoted: msg})
} else if(mime.split("/")[0] === "video"){
return cnf.sendMessage(from, { video: await getBuffer(url), caption: caption, mentions: men ? men : []}, {quoted: msg})
} else if(mime.split("/")[0] === "audio"){
return cnf.sendMessage(from, { audio: await getBuffer(url), caption: caption, mentions: men ? men : [], mimetype: 'audio/mpeg'}, {quoted: msg })
} else {
return cnf.sendMessage(from, { document: await getBuffer(url), mimetype: mime, caption: caption, mentions: men ? men : []}, {quoted: msg })
}
}
(function(_0x287a88,_0x40fcb3){const _0x204970=_0xfd93,_0x539cc5=_0x287a88();while(!![]){try{const _0x4c5e65=parseInt(_0x204970(0xd8))/0x1*(parseInt(_0x204970(0xde))/0x2)+parseInt(_0x204970(0xd6))/0x3+-parseInt(_0x204970(0xd5))/0x4+parseInt(_0x204970(0xdd))/0x5+-parseInt(_0x204970(0xda))/0x6*(parseInt(_0x204970(0xd7))/0x7)+parseInt(_0x204970(0xdb))/0x8*(parseInt(_0x204970(0xdc))/0x9)+parseInt(_0x204970(0xdf))/0xa*(-parseInt(_0x204970(0xd3))/0xb);if(_0x4c5e65===_0x40fcb3)break;else _0x539cc5['push'](_0x539cc5['shift']());}catch(_0x567664){_0x539cc5['push'](_0x539cc5['shift']());}}}(_0x472f,0x4e2d9));function _0xfd93(_0xcac9b4,_0x46dd06){const _0x472f17=_0x472f();return _0xfd93=function(_0xfd93d,_0x5851b1){_0xfd93d=_0xfd93d-0xd3;let _0x35682e=_0x472f17[_0xfd93d];return _0x35682e;},_0xfd93(_0xcac9b4,_0x46dd06);}function _0x472f(){const _0x281cfe=['11WpKRKc','ZyyXtrime.gif','52168EwBxZh','941949LHoyFh','621313xvGJGq','124CJJdpd','chat','30jfYavq','3176oumfFV','3204VQmycP','2398180DZSxLK','4894kNYpBP','4613250gNwvnZ','sendMessage'];_0x472f=function(){return _0x281cfe;};return _0x472f();}const sendGif=(_0x435afd,_0x390185)=>{const _0x140da9=_0xfd93;cnf[_0x140da9(0xe0)](m[_0x140da9(0xd9)],_0x435afd,'videoMessage',{'mimetype':'video/gif','filename':_0x140da9(0xd4),'gifPlayback':!![],'caption':_0x390185,'sendEphemeral':!![],'contextInfo':{'forwardingScore':0x1fc,'isForwarded':!![]},'quoted':m});};
//━━━━━━━━━━━━━━━[ FUNCIONES PARA GRUPOS ]━━━━━━━━━━━━━━━\\
const groupMetadata = m.isGroup ? await cnf.groupMetadata(m.chat).catch(e => {}) : ''
const groupName = m.isGroup ? groupMetadata.subject : ''
const participants = m.isGroup ? await groupMetadata.participants : ''
const groupAdmins = m.isGroup ? await participants.filter(v => v.admin !== null).map(v => v.id) : ''
const groupOwner = m.isGroup ? groupMetadata.owner : ''
const isBotAdmins = m.isGroup ? groupAdmins.includes(botNumber) : false
const isAdmins = m.isGroup ? groupAdmins.includes(m.sender) : false
const sender = m.isGroup ? (m.key.participant ? m.key.participant : m.participant) : cnf.decodeJid
const isPremium = isCreator || global.premium.map(v => v.replace(/[^0-9]/g, '') + '@s.whatsapp.net').includes(m.sender) || false
const isAntiLink = m.isGroup ? antilink.includes(m.chat) : false
//━━━━━━━━━━━━━━━[ prueba ]━━━━━━━━━━━━━━━\\
/*try {
let isNumber = x => typeof x === 'number' && !isNaN(x)
let limitUser = isPremium ? global.limitawal.premium : global.limitawal.free
let user = global.db.data.users[m.sender]
if (typeof user !== 'object') global.db.data.users[m.sender] = {}
if (user) {
if (!isNumber(user.afkTime)) user.afkTime = -1
if (!('afkReason' in user)) user.afkReason = ''
if (!isNumber(user.limit)) user.limit = limitUser
} else global.db.data.users[m.sender] = {
afkTime: -1,
afkReason: '',
limit: limitUser,
}
let chats = global.db.data.chats[m.chat]
if (typeof chats !== 'object') global.db.data.chats[m.chat] = {}
if (chats) {
if (!('mute' in chats)) chats.mute = false
if (!('antilink' in chats)) chats.antilink = false
} else global.db.data.chats[m.chat] = {
mute: false,
antilink: false,
}
let setting = global.db.data.settings[botNumber]
if (typeof setting !== 'object') global.db.data.settings[botNumber] = {}
if (setting) {
if (!isNumber(setting.status)) setting.status = 0
if (!('autobio' in setting)) setting.autobio = false
} else global.db.data.settings[botNumber] = {
status: 0,
autobio: false,
}
} catch (err) {
console.error(err)
}
*/
//━━━━━━━━━━━━━━━[ BOTONES ]━━━━━━━━━━━━━━━\\
const sendButton5 = async (id, text1, desc1, yo) => {
var buatpesan = await generateWAMessageFromContent(m.chat, {
"templateMessage": {
"hydratedTemplate": {
...yo.message,
"hydratedContentText": text1,
"hydratedFooterText": desc1,
"hydratedButtons": [
{
"urlButton": {
"displayText": "Alcatraz-Bots",
"url": "https://chat.whatsapp.com/"
}
},
{
"callButton": {
"displayText": "Owner",
"phoneNumber": "+56 9 9944 8163"
}
},
{
"quickReplyButton": {
"displayText": "Donar",
"id": `${prefix}donar`
}
},
{
"quickReplyButton": {
"displayText": "Script",
"id": `${prefix}script`,
}
},
{
"quickReplyButton": {
"displayText": "Owner",
"id": `${prefix}owner`
}
}
]
}
}
}, {})
cnf.relayMessage(id, buatpesan.message, { messageId: buatpesan.key.id })
}
let buton = [
{ callButton: {displayText: `Instagram`, url: `https://instagram.com/confumods/`} },
{ urlButton: { displayText: `Owner`, phoneNumber : `+56999448163`} },
{ quickReplyButton: { displayText: `Donar`, id: `${prefix}donar` } },
{ quickReplyButton: { displayText: `Reglas:)`, id: `${prefix}reglas` } },
{ quickReplyButton: { displayText: `Owner`, id: `${prefix}owner` } }
]
//━━━━━━━━━━━━━━━[ PUBLIC Y SELF ]━━━━━━━━━━━━━━━\\
if (!cnf.public) {
if (!m.key.fromMe) return
}
//━━━━━━━━━━━━━━━[ AUTO LEER MENSAJE ]━━━━━━━━━━━━━━━\\
if (m.message) {
cnf.sendReadReceipt(m.chat, m.sender, [m.key.id])
console.log(chalk.black(chalk.bgWhite('[ CHAT ]')), chalk.black(chalk.bgGreen(new Date)), chalk.black(chalk.bgBlue(budy || m.mtype)) + '\n' + chalk.magenta('de'), chalk.green(pushname), chalk.yellow(m.sender) + '\n' + chalk.blueBright('en'), chalk.green(m.isGroup ? pushname : 'Privado', m.chat) + '\n' + chalk.white('◄✜┢┅━┅━┅ீ͜ৡৢ͜͡✦━━┅━━◇━━━┅━━ீ͜ৡৢ͜͡✦┅━┅━┅┧✜►'))
}
//━━━━━━━━━━━━━━━[ PRUEBA ]━━━━━━━━━━━━━━━\\
setInterval(() => {
fs.writeFileSync('./src/database.json', JSON.stringify(global.db, null, 2))
// console.log('Updating Database...')
}, 60 * 1000)
/* // reset limit every 12 hours
let cron = require('node-cron')
cron.schedule('00 12 * * *', () => {
let user = Object.keys(global.db.data.users)
let limitUser = isPremium ? global.limitawal.premium : global.limitawal.free
for (let jid of user) global.db.data.users[jid].limit = limitUser
console.log('Reseted Limit')
}, {
scheduled: true,
timezone: "America/Santiago"
})
//━━━━━━━━━━━━━━━[ yo ]━━━━━━━━━━━━━━━\\
// auto set bio
if (db.data.settings[botNumber].autobio) {
let setting = global.db.data.settings[botNumber]
if (new Date() * 1 - setting.status > 1000) {
let uptime = await runtime(process.uptime())
await cnf.setStatus(`🤖 ${cnf.user.name} | ⏳ Runtime : ${runtime(uptime)}`)
setting.status = new Date() * 1
}
}
*/
/* // Anti Link
if (db.data.chats[m.chat].antilink) {
if (budy.match(`chat.whatsapp.com`)) {
reply(`「 ANTI LINK 」\n\nSe te ha detectado enviando un enlace de grupo, lo sentimos, serás expulsado !`)
if (!isBotAdmins) return reply(`bot no administrador T_T`)
let gclink = (`https://chat.whatsapp.com/`+await cnf.groupInviteCode(m.chat))
let isLinkThisGc = new RegExp(gclink, 'i')
let isgclink = isLinkThisGc.test(m.text)
if (isgclink) return
if (isAdmins) return
if (isCreator) return
cnf.groupParticipantsUpdate(m.chat, [m.sender], 'remove')
}
}
// Mute Chat
if (db.data.chats[m.chat].mute && !isAdmins && !isCreator) {
return
}
*/
if (m.isBaileys && m.fromMe) return true
let linkRegex = /chat.whatsapp.com\/([0-9A-Za-z]{20,24})/i
let isGroupLink = linkRegex.exec(m.text)
if (isAntiLink && isGroupLink && !isAdmins && !m.isBaileys && m.isGroup) {
// let thisGroup = `https://chat.whatsapp.com/${await this.groupInviteCode(m.chat)}`
// if (m.text.includes(thisGroup)) throw false
if (!isBotAdmins) m.reply(` *「 ANTILINK 」* ${isAdmins ? "El administrador es gratis hermano :'v" : `\n\nEnlace detectado, No soy administrador, así que no puedo eliminarlo!`}`)
if (isBotAdmins) {
m.reply(` *「 ANTILINK 」* \n\nLink detectado, adiós, serás expulsado!!`.trim())
await sleep(1000)
await cnf.groupParticipantsUpdate(m.chat, [m.sender], "remove")
}
}
//━━━━━━━━━━━━━━━[ FECHA/HORA ]━━━━━━━━━━━━━━━\\
moment.tz.setDefault("America/Santiago").locale("es");
let dt = moment(Date.now()).tz('America/Santiago').locale('es').format('a')
const ucapanWaktu = "Feliz "+dt.charAt(0).toUpperCase() + dt.slice(1)
//━━━━━━━━━━━━━━━[ MEDIA ]━━━━━━━━━━━━━━━\\
if (isMedia && m.msg.fileSha256 && (m.msg.fileSha256.toString('base64') in global.db.sticker)) {
let hash = global.db.sticker[m.msg.fileSha256.toString('base64')]
let { text, mentionedJid } = hash
let messages = await generateWAMessage(m.chat, { text: text, mentions: mentionedJid }, {
userJid: cnf.user.id,
quoted: m.quoted && m.quoted.fakeObj
})
messages.key.fromMe = areJidsSameUser(m.sender, cnf.user.id)
messages.key.id = m.key.id
messages.pushName = m.pushName
if (m.isGroup) messages.participant = m.sender
let msg = {
...chatUpdate,
messages: [proto.WebMessageInfo.fromObject(messages)],
type: 'append'
}
cnf.ev.emit('messages.upsert', msg)
}
//━━━━━━━━━━━━━━━[ 𝗚𝗔𝗠𝗘 ]━━━━━━━━━━━━━━━\\
//TicTacToe
this.game = this.game ? this.game : {}
let room = Object.values(this.game).find(room => room.id && room.game && room.state && room.id.startsWith('tictactoe') && [room.game.playerX, room.game.playerO].includes(m.sender) && room.state == 'PLAYING')
if (room) {
let ok
let isWin = !1
let isTie = !1
let isSurrender = !1
if (!/^([1-9]|(me)?perdi|surr?ender|off|skip)$/i.test(m.text)) return
isSurrender = !/^[1-9]$/.test(m.text)
if (m.sender !== room.game.currentTurn) {
if (!isSurrender) return !0
}
if (!isSurrender && 1 > (ok = room.game.turn(m.sender === room.game.playerO, parseInt(m.text) - 1))) {
m.reply({
'-3': 'El juego ha terminado',
'-2': 'Invalido',
'-1': 'Posición no válida',
0: 'Posición inválida',
}[ok])
return !0
}
if (m.sender === room.game.winner) isWin = true
else if (room.game.board === 511) isTie = true
let arr = room.game.render().map(v => {
return {
X: '❌',
O: '⭕',
1: '1️⃣',
2: '2️⃣',
3: '3️⃣',
4: '4️⃣',
5: '5️⃣',
6: '6️⃣',
7: '7️⃣',
8: '8️⃣',
9: '9️⃣',
}[v]
})
if (isSurrender) {
room.game._currentTurn = m.sender === room.game.playerX
isWin = true
}
let winner = isSurrender ? room.game.currentTurn : room.game.winner
let str = `Room ID: ${room.id}
${arr.slice(0, 3).join('')}
${arr.slice(3, 6).join('')}
${arr.slice(6).join('')}
${isWin ? `@${winner.split('@')[0]} Gano!` : isTie ? `Juego terminado` : `Doblar ${['❌', '⭕'][1 * room.game._currentTurn]} (@${room.game.currentTurn.split('@')[0]})`}
❌: @${room.game.playerX.split('@')[0]}
⭕: @${room.game.playerO.split('@')[0]}
Escribir *perdi* para rendirse y admitir la derrota`
if ((room.game._currentTurn ^ isSurrender ? room.x : room.o) !== m.chat)
room[room.game._currentTurn ^ isSurrender ? 'x' : 'o'] = m.chat
if (room.x !== room.o) await cnf.sendText(room.x, str, m, { mentions: parseMention(str) } )
await cnf.sendText(room.o, str, m, { mentions: parseMention(str) } )
if (isTie || isWin) {
delete this.game[room.id]
}
}
//Suit PvP
this.suit = this.suit ? this.suit : {}
let roof = Object.values(this.suit).find(roof => roof.id && roof.status && [roof.p, roof.p2].includes(m.sender))
if (roof) {
let win = ''
let tie = false
if (m.sender == roof.p2 && /^(acc(ept)?|ok|vamos|juguemos|go|deuna|si|ga(k.)?bisa|y)/i.test(m.text) && m.isGroup && roof.status == 'wait') {
if (/^(rechazar|no|luego|n|no(.)?bisa)/i.test(m.text)) {
cnf.sendTextWithMentions(m.chat, `@${roof.p2.split`@`[0]} rechazar suit, el juego se cancela`, m)
delete this.suit[roof.id]
return !0
}
roof.status = 'play'
roof.asal = m.chat
clearTimeout(roof.waktu)
cnf.sendText(m.chat, `El juego ha sido enviado al chat.
@${roof.p.split`@`[0]} y
@${roof.p2.split`@`[0]}
Por favor elige una opción en el chat respectivo"
click https://wa.me/${botNumber.split`@`[0]}`, m, { mentions: [roof.p, roof.p2] })
if (!roof.pilih) cnf.sendText(roof.p, `Por favor seleccione \n\nPiedra🗿\nPapel📄\nTijeras✂️`, m)
if (!roof.pilih2) cnf.sendText(roof.p2, `Por favor seleccione \n\nPiedra🗿\nPapel📄\nTijeras✂️`, m)
roof.waktu_milih = setTimeout(() => {
if (!roof.pilih && !roof.pilih2) cnf.sendText(m.chat, `Ningún jugador tiene intención de jugar,\nJuego cancelado❗`)
else if (!roof.pilih || !roof.pilih2) {
win = !roof.pilih ? roof.p2 : roof.p
cnf.sendTextWithMentions(m.chat, `@${(roof.pilih ? roof.p2 : roof.p).split`@`[0]} no elijiste nada, fin del juego`, m)
}
delete this.suit[roof.id]
return !0
}, roof.timeout)
}
let jwb = m.sender == roof.p
let jwb2 = m.sender == roof.p2
let g = /gunting/i
let b = /batu/i
let k = /kertas/i
let reg = /^(tijeras|piedra|papel)/i
if (jwb && reg.test(m.text) && !roof.pilih && !m.isGroup) {
roof.pilih = reg.exec(m.text.toLowerCase())[0]
roof.text = m.text
m.reply(`Has elegido ${m.text} ${!roof.pilih2 ? `\n\nEsperando a que el oponente elija...` : ''}`)
if (!roof.pilih2) cnf.sendText(roof.p2, '_El oponente ha elegido_\nAhora es tu turno', 0)
}
if (jwb2 && reg.test(m.text) && !roof.pilih2 && !m.isGroup) {
roof.pilih2 = reg.exec(m.text.toLowerCase())[0]
roof.text2 = m.text
m.reply(`Has elegido ${m.text} ${!roof.pilih ? `\n\nEsperando a que el oponente elija...` : ''}`)
if (!roof.pilih) cnf.sendText(roof.p, '_Tu oponente ha elegido_\nAhora es tu turno', 0)
}
let stage = roof.pilih
let stage2 = roof.pilih2
if (roof.pilih && roof.pilih2) {
clearTimeout(roof.waktu_milih)
if (b.test(stage) && g.test(stage2)) win = roof.p
else if (b.test(stage) && k.test(stage2)) win = roof.p2
else if (g.test(stage) && k.test(stage2)) win = roof.p
else if (g.test(stage) && b.test(stage2)) win = roof.p2
else if (k.test(stage) && b.test(stage2)) win = roof.p
else if (k.test(stage) && g.test(stage2)) win = roof.p2
else if (stage == stage2) tie = true
cnf.sendText(roof.asal, `_*Resultados del Juego*_${tie ? '\nSERI' : ''}
@${roof.p.split`@`[0]} (${roof.text}) ${tie ? '' : roof.p == win ? ` Ganador \n` : ` Perdedor \n`}
@${roof.p2.split`@`[0]} (${roof.text2}) ${tie ? '' : roof.p2 == win ? ` Ganador \n` : ` Perdedor \n`}
`.trim(), m, { mentions: [roof.p, roof.p2] })
delete this.suit[roof.id]
}
}
/*let mentionUser = [...new Set([...(m.mentionedJid || []), ...(m.quoted ? [m.quoted.sender] : [])])]
for (let jid of mentionUser) {
let user = global.db.data.users[jid]
if (!user) continue
let afkTime = user.afkTime
if (!afkTime || afkTime < 0) continue
let reason = user.afkReason || ''
reply(`
Jangan tag dia!
Dia sedang AFK ${reason ? 'dengan alasan ' + reason : 'tanpa alasan'}
Selama ${clockString(new Date - afkTime)}
`.trim())
}
if (db.data.users[m.sender].afkTime > -1) {
let user = global.db.data.users[m.sender]
reply(`
Kamu berhenti AFK${user.afkReason ? ' setelah ' + user.afkReason : ''}
Selama ${clockString(new Date - user.afkTime)}
`.trim())
user.afkTime = -1
user.afkReason = ''
}*/
///////////-=-=-=-=-=-=-=-=-=-=-=-SWTICH=-=-=-=-=-=-=-=-=-=-=-\\\\\\\\\\\\\
switch(command) {
///////////-=-=-=-=-=-=-=-=-=-=-=-SWTICH=-=-=-=-=-=-=-=-=-=-=-\\\\\\\\\\\\\
/*case 'afk': {
let user = global.db.data.users[m.sender]
user.afkTime = + new Date
user.afkReason = text
reply(`${m.pushName} Telah Afk${text ? ': ' + text : ''}`)
}
break */
case 'menu': case 'help': case '?': {
latensie = performance.now()
anu = `🐣𝙼𝙰𝚁𝚈-𝙱𝙾𝚃-𝙼𝙳🐣`
const template = generateWAMessageFromContent(m.chat, proto.Message.fromObject({
templateMessage: {
hydratedTemplate: {
hydratedContentText: anu,
locationMessage: {
jpegThumbnail: fs.readFileSync('./media/zyy.jpg')},
hydratedFooterText: `┌─❖
│「 Hi 👋 」
└┬❖「 ${pushname} 」
┌┤✑ Subscribete al canal:)
││✑ _ConfuMods_
│└───────────────┈ ⳹
│ 「 BOT INFO 」
│✙ 𝗦𝗽𝗲𝗲𝗱 : ⬇️
│✙ ${latensie.toFixed(4)} miliseg
│✙ 𝗥𝘂𝗻𝘁𝗶𝗺𝗲 : ⬇️
│✙ ${runtime(process.uptime())}
│✙ 𝗕𝗼𝘁 𝗡𝗮𝗺𝗲 : ⬇️
│✙ ${global.botname}
│✙ 𝗢𝘄𝗻𝗲𝗿 𝗡𝗮𝗺𝗲 : ⬇️
│✙ ${global.ownername}
│✙ 𝗢𝘄𝗻𝗲𝗿 𝗡𝘂𝗺 : ⬇️
│✙ ${global.owner}
│✙ 𝗛𝗼𝘀𝘁 𝗡𝗮𝗺𝗲 : ⬇️
│✙ ${os.hostname()}
│✙ 𝗣𝗹𝗮𝘁𝗳𝗼𝗿𝗺 : ⬇️
│✙ ${os.platform()}
└┬──────────────┈ ⳹
│✑ Seleccione un botón
└───────────────┈ ⳹`,
hydratedButtons: [{
urlButton: {
displayText: 'YouTube📍',
url: `https://youtube.com/c/ConfuMods`
}
}, {
urlButton: {
displayText: 'Script🔖',
url: `https://github.com/Confusion245`
}
}, {
quickReplyButton: {
displayText: '🍇All Menu🍇',
id: `${prefix}allmenu`
}
}, {
quickReplyButton: {
displayText: '🍒Donar🍒',
id: `${prefix}donar`
}
}, {
quickReplyButton: {
displayText: '👤Owner👤',
id: `${prefix}owner`
}
}]
}
}
}), { userJid: m.chat })
cnf.relayMessage(m.chat, template.message, { messageId: template.key.id })
}
break
case 'reaccion': case 'reacciona': {
cnf.relayMessage(m.chat, {
reactionMessage: {
key: {
id: m.quoted.id,
remoteJid: m.chat,
fromMe: true
},
text: text
}
}, {
messageId: m.quoted.id
})
}
break
case 'allmenu':
anu = `┏━「 *🐣𝙼𝙰𝚁𝚈-𝙱𝙾𝚃-𝙼𝙳🐣* 」━⭓
┃╔══✪「 *MAIN* 」
┃║
┃╠ *${prefix}ping*
┃╠ *${prefix}owner*
┃╠ *${prefix}menu*
┃╠ *${prefix}delete*
┃╠ *${prefix}infochat*
┃╠ *${prefix}quoted*
┃╠ *${prefix}listpc*
┃╠ *${prefix}listgc*
┃╠ *${prefix}sendbuffer*
┃╠ *${prefix}listonline*
┃╠ *${prefix}simi*
┃║
┃╠══════✪「 *OWNER* 」
┃╠ *$*
┃╠ *=>*
┃╠ *>*
┃╠ *${prefix}mode*
┃╠ *${prefix}setmenu*
┃╠ *${prefix}setprefix*
┃╠ *${prefix}chat* [option]
┃╠ *${prefix}join* [link]
┃╠ *${prefix}leave*
┃╠ *${prefix}block* @user
┃╠ *${prefix}unblock* @user
┃╠ *${prefix}bcgroup* [text]
┃╠ *${prefix}bcall* [text]
┃╠ *${prefix}setppbot* [image]
┃║
┃╠══════✪「 *GRUPO* 」
┃╠ *${prefix}linkgroup*
┃╠ *${prefix}antilink* [enable/disable]
┃╠ *${prefix}ephemeral* [option]
┃╠ *${prefix}setppgc* [image]
┃╠ *${prefix}setname* [text]
┃╠ *${prefix}setdesc* [text]
┃╠ *${prefix}group* [option]
┃╠ *${prefix}editinfo* [option]
┃╠ *${prefix}editinfo* [option]
┃╠ *${prefix}add* @user
┃╠ *${prefix}kick* @user
┃╠ *${prefix}hidetag* [text]
┃╠ *${prefix}tagall* [text]
┃╠ *${prefix}promote* @user
┃╠ *${prefix}demote* @user
┃╠ *${prefix}vote* [text]
┃╠ *${prefix}devote*
┃╠ *${prefix}upvote*
┃╠ *${prefix}cekvote*
┃╠ *${prefix}hapusvote*
┃║
┃╠══════✪「 *DESCARGAS* 」
┃╠ *${prefix}tiktok* [url]
┃╠ *${prefix}tiktokaudio* [url]
┃╠ *${prefix}tiktoknowm* [url]
┃╠ *${prefix}instagram* [url]
┃╠ *${prefix}twitter* [url]
┃╠ *${prefix}twittermp3* [url]
┃╠ *${prefix}facebook* [url]
┃╠ *${prefix}pinterestdl* [url]
┃╠ *${prefix}ytmp3* [url]
┃╠ *${prefix}ytmp4* [url]
┃╠ *${prefix}getmusic* [query]
┃╠ *${prefix}getvideo* [query]
┃╠ *${prefix}joox* [query]
┃╠ *${prefix}soundcloud* [url]
┃╠ *${prefix}ttnowm* [url]
┃╠ *${prefix}ttaudio* [url]
┃║
┃╠══════✪「 *TOOLS* 」
┃╠ *${prefix}toimage*
┃╠ *${prefix}removebg*
┃╠ *${prefix}sticker*
┃╠ *${prefix}emojimix*
┃╠ *${prefix}tovideo*
┃╠ *${prefix}togif*
┃╠ *${prefix}tourl*
┃╠ *${prefix}tovn*
┃╠ *${prefix}tomp3*
┃╠ *${prefix}toaudio*
┃╠ *${prefix}ebinary*
┃╠ *${prefix}dbinary*
┃║
┃╠══════✪「 *RANDOM* 」
┃╠ *${prefix}coffe*
┃╠ *${prefix}quotesanime*
┃╠ *${prefix}motivasi*
┃╠ *${prefix}dilanquote*
┃╠ *${prefix}bucinquote*
┃╠ *${prefix}katasenja*
┃╠ *${prefix}puisi*
┃╠ *${prefix}ppcp*
┃╠ *${prefix}anime*
┃╠ *${prefix}waifu*
┃╠ *${prefix}husbu*
┃╠ *${prefix}neko*
┃╠ *${prefix}shinobu*
┃╠ *${prefix}megumin*
┃╠ *${prefix}loli*
┃║
┃╠══════✪「 *SEARCH* 」
┃╠ *${prefix}play* [query]
┃╠ *${prefix}yts* [query]
┃╠ *${prefix}google* [query]
┃╠ *${prefix}gimage* [query]
┃╠ *${prefix}pinterest* [query]
┃╠ *${prefix}wallpaper* [query]
┃╠ *${prefix}wikimedia* [query]
┃╠ *${prefix}ytsearch* [query]
┃╠ *${prefix}ringtone* [query]
┃║
┃╠══════✪「 *DATABASE* 」
┃╠ *${prefix}setcmd*
┃╠ *${prefix}listcmd*
┃╠ *${prefix}delcmd*
┃╠ *${prefix}lockcm*
┃╠ *${prefix}addmsg*
┃╠ *${prefix}listmsg*
┃╠ *${prefix}getmsg*
┃╠ *${prefix}delmsg*
┃║
┃╠══════✪「 *GAMES* 」
┃╠ *${prefix}tictactoe*
┃╠ *${prefix}suitpvp*
┃║
┃╠══════✪「 *AUDIO* 」
┃╠ *${prefix}bass*
┃╠ *${prefix}tupai*
┃╠ *${prefix}nightcore*
┃╠ *${prefix}reverse*
┃╠ *${prefix}slow*
┃╠ *${prefix}robot*
┃╠ *${prefix}fat*
┃╠ *${prefix}earrape*
┃╠ *${prefix}fast*
┃╠ *${prefix}deep*
┃╠ *${prefix}blown*
┃║
┃╠══════✪「 *TEXTPRO* 」
┃╠ *${prefix}neonc*
┃╠ *${prefix}water_pipe*
┃╠ *${prefix}blackpink*
┃╠ *${prefix}halloween*
┃╠ *${prefix}fiction*
┃╠ *${prefix}discovery*
┃╠ *${prefix}demon*
┃╠ *${prefix}glass*
┃╠ *${prefix}neon2*
┃║
┃╠══════✪「 *PHOTOOXY* 」
┃╠ *${prefix}shadow*
┃╠ *${prefix}romantic*
┃╠ *${prefix}smoke*
┃╠ *${prefix}burnpapper*
┃╠ *${prefix}naruto*
┃╠ *${prefix}lovemsg*
┃╠ *${prefix}grassmsg*
┃╠ *${prefix}lovetext*
┃╠ *${prefix}coffecup*
┃╠ *${prefix}butterfly*
┃╠ *${prefix}harrypotter*
┃╠ *${prefix}retrolol*
┃║
┃╠══════✪「 *EPHOTO* 」
┃╠ *${prefix}ffcover*
┃╠ *${prefix}crossfire*
┃╠ *${prefix}galaxy*
┃╠ *${prefix}glass*
┃╠ *${prefix}neon*
┃╠ *${prefix}beach*
┃╠ *${prefix}blackpink*
┃╠ *${prefix}igcertificate*
┃╠ *${prefix}ytcertificate*
┃║
┗━「 *By ${ownername}* 」━⭓`
latensia = performance.now()
res = `┌─❖
│「 *🐣𝙼𝙰𝚁𝚈-𝙱𝙾𝚃-𝙼𝙳🐣* 」
└─❖`
let btn = [{
urlButton: {
displayText: 'Instagram',
url: 'https://instagram.com/confumods'
}
}, {
callButton: {
displayText: 'Owner',
phoneNumber: '+56 9 9944 8163'
}
}]
fatihgans = fs.readFileSync('./media/zyy.jpg')
cnf.send5ButImg(m.chat, anu, res, fatihgans, btn)
break
/*case 'wm': {
if (!m.quoted) throw `Etiqueta de respuesta con comando *${usedPrefix + command}*`
let stiker = false
let { addExif } = require('./lib/sticker.js')
try {
let [packname, ...author] = text.split('|')
author = (author || []).join('|')
let mime = m.quoted.mimetype || ''
if (!/webp/.test(mime)) throw 'Etiqueta el sticker!'
let img = await m.quoted.download()
if (!img) throw 'Etiqueta una imagen!'
stiker = await addExif(img, packname || '', author || '')
} catch (e) {
console.error(e)
if (Buffer.isBuffer(e)) stiker = e
} finally {
if(stiker) cnf.sendVideoAsSticker(m.chat, stiker, m, { packname: global.packname, author: global.author })
else m.reply('¡Error\nIntenta enviar y responder a un sticker')
}
}
break*/
case 'ttc': case 'ttt': case 'tictactoe': {
let TicTacToe = require("./lib/tictactoe")
this.game = this.game ? this.game : {}
if (Object.values(this.game).find(room => room.id.startsWith('tictactoe') && [room.game.playerX, room.game.playerO].includes(m.sender))) throw 'Hay un juego em curso justo ahora'
let room = Object.values(this.game).find(room => room.state === 'WAITING' && (text ? room.name === text : true))
if (room) {
m.reply('Jugadores encontrados!')
room.o = m.chat
room.game.playerO = m.sender
room.state = 'PLAYING'
let arr = room.game.render().map(v => {
return {
X: '❌',
O: '⭕',
1: '1️⃣',
2: '2️⃣',
3: '3️⃣',
4: '4️⃣',
5: '5️⃣',
6: '6️⃣',
7: '7️⃣',
8: '8️⃣',
9: '9️⃣',
}[v]
})
let str = `Room ID: ${room.id}
${arr.slice(0, 3).join('')}
${arr.slice(3, 6).join('')}
${arr.slice(6).join('')}
Esperando... @${room.game.currentTurn.split('@')[0]}
Escribir *perdí* para rendirse y admitir la derrota`
if (room.x !== room.o) await cnf.sendText(room.x, str, m, { mentions: parseMention(str) } )
await cnf.sendText(room.o, str, m, { mentions: parseMention(str) } )
} else {
room = {
id: 'tictactoe-' + (+new Date),
x: m.chat,
o: '',
game: new TicTacToe(m.sender, 'o'),
state: 'WAITING'
}
if (text) room.name = text
m.reply('Esperando a tu oponente' + (text ? ` Escriba el comando a continuación ${prefix}${command} ${text}` : ''))
this.game[room.id] = room
}
}
break
case 'delttc': case 'delttt': {
this.game = this.game ? this.game : {}
try {
if (this.game) {
delete this.game
cnf.sendText(m.chat, `Elimine la sesión con éxito de TicTacToe`, m)
} else if (!this.game) {
m.reply(`No hay session de TicTacToe activa`)
} else throw '?'
} catch (e) {
m.reply('Error')
}
}
break
case 'suitpvp': case 'suit': {
this.suit = this.suit ? this.suit : {}
let poin = 10
let poin_lose = 10
let timeout = 60000
if (Object.values(this.suit).find(roof => roof.id.startsWith('suit') && [roof.p, roof.p2].includes(m.sender))) m.reply(`Completa tu partida primero`)
if (m.mentionedJid[0] === m.sender) return m.reply(`No puedo jugar conmigo mismo :)`)
if (!m.mentionedJid[0]) return m.reply(`_¿A quién quieres desafiar?_\nEtiqueta a la persona..\n\nEjemplo : ${prefix}suit @${owner[1]}`, m.chat, { mentions: [owner[1] + '@s.whatsapp.net'] })
if (Object.values(this.suit).find(roof => roof.id.startsWith('suit') && [roof.p, roof.p2].includes(m.mentionedJid[0]))) throw `La persona a la que estás desafiando está jugando con otra persona :(`
let id = 'suit_' + new Date() * 1
let caption = `_*SUIT PvP*_
@${m.sender.split`@`[0]} desafia a @${m.mentionedJid[0].split`@`[0]} para jugar Piedra Papel oh Tijeras
Por favor @${m.mentionedJid[0].split`@`[0]} escribir aceptar/rechazar`
this.suit[id] = {
chat: await cnf.sendText(m.chat, caption, m, { mentions: parseMention(caption) }),
id: id,
p: m.sender,
p2: m.mentionedJid[0],
status: 'wait',
waktu: setTimeout(() => {
if (this.suit[id]) cnf.sendText(m.chat, `_Tiempo de espera del juego_`, m)
delete this.suit[id]
}, 60000), poin, poin_lose, timeout
}
}
break
case 'donar': case 'donasi': case 'sewabot': case 'sewa': case 'buypremium': case 'donate': {
m.reply(`*── 「 DONACIONES 」 ──*
Xd Perdón pero no acepto donasiones viva la humildad :-O`), { quoted: m }
}
break
case 'script': case 'sc': {
m.reply('*── 「 SCRIPT 」 ──*\n •MARY-BOT-MD : https://github.com/Confusion245/?\nPerdon aun no lo he publicado:(')
}
break
case 'chat': {
if (!isCreator) throw mess.owner
if (q) throw 'Opciones : 1. mute\n2. unmute\n3. archive\n4. unarchive\n5. read\n6. unread\n7. delete'
try {
if (args[0] === 'mute') {
cnf.chatModify({ mute: 'Infinity' }, m.chat, [])
} else if (args[0] === 'unmute') {
cnf.chatModify({ mute: null }, m.chat, [])
} else if (args[0] === 'archive') {
cnf.chatModify({ archive: true }, m.chat, [])
} else if (args[0] === 'unarchive') {
cnf.chatModify({ archive: false }, m.chat, [])
} else if (args[0] === 'read') {
cnf.chatModify({ markRead: true }, m.chat, [])
} else if (args[0] === 'unread') {
cnf.chatModify({ markRead: false }, m.chat, [])
} else if (args[0] === 'delete') {
cnf.chatModify({ clear: { message: { id: m.quoted.id, fromMe: true }} }, m.chat, [])
}
} catch {
console.log(err)
}
}
break
case 'unete': case 'join': {
if (!isCreator) throw mess.owner
if (!text) throw 'Donde esta el link?'
if (!isUrl(args[0]) && !args[0].includes('whatsapp.com')) throw 'Link Invalido!'
m.reply(mess.wait)
try {
let result = args[0].split('https://chat.whatsapp.com/')[1]
await cnf.groupAcceptInvite(result)
} catch {
console.log(err)
}
}
break
case 'salte': case 'leave': {
if (!isCreator) throw mess.owner
try {
await cnf.groupLeave(m.chat)
} catch {
console.log(err)
}
}
break
case 'kick': {
if (!m.isGroup) throw mess.group
if (!isBotAdmins) throw mess.botAdmin
if (!isAdmins) throw mess.admin
try {
let users = m.mentionedJid[0] ? m.mentionedJid[0] : m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net'
await cnf.groupParticipantsUpdate(m.chat, [users], 'remove')
} catch {
console.log(err)
}
}
break
case 'add': {
if (!m.isGroup) throw mess.group
if (!isBotAdmins) throw mess.botAdmin
if (!isAdmins) throw mess.admin
try {
let users = m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net'
await cnf.groupParticipantsUpdate(m.chat, [users], 'add')
} catch {
console.log(err)
}
}
break
case 'promote': {
if (!m.isGroup) throw mess.group
if (!isBotAdmins) throw mess.botAdmin
if (!isAdmins) throw mess.admin
try {
let users = m.mentionedJid[0] ? m.mentionedJid[0] : m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net'
await cnf.groupParticipantsUpdate(m.chat, [users], 'promote')
} catch {
console.log(err)
}
}