-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkurrxd.js
5887 lines (5562 loc) · 227 KB
/
kurrxd.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/settings')
const { BufferJSON, WA_DEFAULT_EPHEMERAL, generateWAMessageFromContent, proto, generateWAMessageContent, generateWAMessage, prepareWAMessageMedia, areJidsSameUser, getContentType } = require("@adiwajshing/baileys");
const fs = require("fs");
const cheerio = require("cheerio");
const chalk = require("chalk");
const crypto = require("crypto");
const axios = require("axios");
const moment = require("moment-timezone");
const fetch = require("node-fetch");
const Jimp = require("jimp");
const util = require("util");
const { sizeFormatter} = require("human-readable")
const format = sizeFormatter()
const { color, bgcolor, mycolor } = require('./lib/color')
const { imageToWebp, videoToWebp, writeExifImg, writeExifVid } = require('./lib/exif')
const { smsg, formatp, tanggal, formatDate, getTime, isUrl, sleep, clockString, runtime, fetchJson, getBuffer, jsonformat, parseMention, getRandom } = require('./lib/functions')
module.exports = kurrxd = async (kurrxd, m, chatUpdate, store) => {
try {
//YASS GMG
const mess = JSON.parse(fs.readFileSync('./mess.json'));
const pler = JSON.parse(fs.readFileSync('./js/db/idgrup.json').toString())
const antilink = JSON.parse(fs.readFileSync('./database/antilink.json'));
const db_error = JSON.parse(fs.readFileSync('./database/error.json'));
const db_respon_list = JSON.parse(fs.readFileSync('./database/list.json'));
const { isUrl, getRandom, getGroupAdmins, runtime, sleep, jsonformat, reSize, makeid, fetchJson, getBuffer } = require("../js/lib/myfunc");
const { addResponList, delResponList, isAlreadyResponList, isAlreadyResponListGroup, sendResponList, updateResponList, getDataResponList } = require('../js/lib/addlist');
const jangan = m.isGroup ? pler.includes(m.chat) : false
if (!kurrxd.public) {
if (!m.key.fromMe) return
}
const { addSaldo, minSaldo, cekSaldo } = require("../function/deposit");
global.prefa = ['','.']
const payment = "./config/setting"
// Database
let db_saldo = JSON.parse(fs.readFileSync("./options/saldo.json"));
let depositPath = "./options/deposit/"
//nof ahahha
const 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) : ''
const budy = (typeof m.text == 'string' ? m.text : '')
const prefix = /^[°#*+,.?=''():√%!¢£¥€π¤ΠΦ_&`™©®Δ^βα¦|/\\©^]/.test(body) ? body.match(/^[°#*+,.?=''():√%¢£¥€π¤ΠΦ_&!`™©®Δ^βα¦|/\\©^]/gi) : '.'
const chath = (m.mtype === 'conversation' && m.message.conversation) ? m.message.conversation : (m.mtype == 'imageMessage') && m.message.imageMessage.caption ? m.message.imageMessage.caption : (m.mtype == 'documentMessage') && m.message.documentMessage.caption ? m.message.documentMessage.caption : (m.mtype == 'videoMessage') && m.message.videoMessage.caption ? m.message.videoMessage.caption : (m.mtype == 'extendedTextMessage') && m.message.extendedTextMessage.text ? m.message.extendedTextMessage.text : (m.mtype == 'buttonsResponseMessage' && m.message.buttonsResponseMessage.selectedButtonId) ? m.message.buttonsResponseMessage.selectedButtonId : (m.mtype == 'templateButtonReplyMessage') && m.message.templateButtonReplyMessage.selectedId ? m.message.templateButtonReplyMessage.selectedId : (m.mtype == "listResponseMessage") ? m.message.listResponseMessage.singleSelectReply.selectedRowId : (m.mtype == "messageContextInfo") ? m.message.listResponseMessage.singleSelectReply.selectedRowId : ''
const content = JSON.stringify(m.message)
const { type, quotedMsg, mentioned, now, fromMe } = m
const isCmd = body.startsWith(prefix)
const from = m.key.remoteJid
const jam = moment.tz('asia/jakarta').format('HH:mm:ss')
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 kurrxd.decodeJid(kurrxd.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 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 { chats } = m
const text = args.join(" ")
const owner = JSON.parse(fs.readFileSync('./config/seller.json').toString())
const isSeler = [botNumber, ...owner].map(v => v.replace(/[^0-9]/g, '') + '@s.whatsapp.net').includes(m.sender)
const tanggal = moment.tz('Asia/Jakarta').format('DD/MM/YY')
const isGroup = m.key.remoteJid.endsWith('@g.us')
const sender = m.isGroup ? (m.key.participant ? m.key.participant : m.participant) : m.key.remoteJid
const groupMetadata = m.isGroup ? await kurrxd.groupMetadata(m.chat).catch(e => {}) : ''
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 groupName = m.isGroup ? groupMetadata.subject : ''
const groupMembers = m.isGroup ? groupMetadata.participants : ''
const isBotAdmins = m.isGroup ? groupAdmins.includes(botNumber) : false
const isGroupAdmins = m.isGroup ? groupAdmins.includes(m.sender) : false
const isAdmins = m.isGroup ? groupAdmins.includes(m.sender) : false
const hariini = moment.tz('Asia/Jakarta').format('dddd, DD MMMM YYYY')
var sticSukses = (hehe) => {
ano = fs.readFileSync('./basezrill/stickernye/SuksesCok.webp')
kurrxd.sendImageAsSticker(from, ano, m, { packname: global.packname, author: global.author })
}
if (!kurrxd.public) {
if (!m.key.fromMe) return
}
if (m.message) {
kurrxd.readMessages([m.key])
}
const wib = moment.tz('Asia/Jakarta').format('HH : mm : ss')
const wita = moment.tz('Asia/Makassar').format('HH : mm : ss')
const wit = moment.tz('Asia/Jayapura').format('HH : mm : ss')
//tourl
const { imageToWebp, videoToWebp, writeExifImg, writeExifVid } = require('../js/lib/exif')
//ANTILINK
const isAntiLink = antilink.includes(from) ? true : false
const isBotGroupAdmins = groupAdmins.includes(botNumber) || false
//// welcom
///ANTI LINK YAH
//Anti Link
//Antilink
if (isGroup && isAntiLink && isBotGroupAdmins){
if (budy.match(/(https:\/\/chat.whatsapp.com)/gi)) {
if (!isBotGroupAdmins) return //m.reply('Untung gw bukan admin')
if (isCreator) return //m.reply('Untung lu owner ku:v😙')
if (fromMe) return //m.reply('Gw bebas share link')
await kurrxd.sendMessage(from, { delete: m.key })
m.reply(`*「 GROUP LINK DETECTOR 」*\n\nTerdeteksi anak kontol kirim link grup, sorry dek linknya gw hapus`)
//kurrxd.groupParticipantsUpdate(from, [sender], "remove")
}
}
//yass pedia
const { color, bgcolor, mycolor } = require('../js/lib/color')
if (isCmd && m.isGroup) { console.log(chalk.bold.rgb(255, 178, 102)('\x1b[1;31m~\x1b[1;37m> [\x1b[1;32mCMD\x1b[1;37m]'), chalk.bold.rgb(153, 255, 153)(command), chalk.bold.rgb(204, 204, 0)("from"), chalk.bold.rgb(153, 255, 204)(pushname), chalk.bold.rgb(204, 204, 0)("in"), chalk.bold.rgb(255, 178, 102)("Group Chat"), chalk.bold('[' + args.length + ']')); }
if (isCmd && !m.isGroup) { console.log(chalk.bold.rgb(255, 178, 102)('\x1b[1;31m~\x1b[1;37m> [\x1b[1;32mCMD\x1b[1;37m]'), chalk.bold.rgb(153, 255, 153)(command), chalk.bold.rgb(204, 204, 0)("from"), chalk.bold.rgb(153, 255, 204)(pushname), chalk.bold.rgb(204, 204, 0)("in"), chalk.bold.rgb(255, 178, 102)("Private Chat"), chalk.bold('[' + args.length + ']')); }
try {
ppuser = await kurrxd.profilePictureUrl(m.sender, 'image')
} catch (err) {
ppuser = 'https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_960_720.png?q=60'
}
ppnyauser = await getBuffer(ppuser)
const generateProfilePicture = async(buffer) => {
const jimp_1 = await Jimp.read(buffer);
const resz = jimp_1.getWidth() > jimp_1.getHeight() ? jimp_1.resize(550, Jimp.AUTO) : jimp_1.resize(Jimp.AUTO, 650)
const jimp_2 = await Jimp.read(await resz.getBufferAsync(Jimp.MIME_JPEG));
return {
img: await resz.getBufferAsync(Jimp.MIME_JPEG)
}
}
const nyoutube = ('©DimzHost') //ubah di config biar ngk emr
//━━━━━━━━━━━━━━━[ DIWNLOAD YTMP3 ]━━━━━━━━━━━━━━━━━//
async function sendkurrxdMessage(chatId, message, options = {}){
let generate = await generateWAMessage(chatId, message, options)
let type2 = getContentType(generate.message)
if ('contextInfo' in options) generate.message[type2].contextInfo = options?.contextInfo
if ('contextInfo' in message) generate.message[type2].contextInfo = message?.contextInfo
return await kurrxd.relayMessage(chatId, generate.message, { messageId: generate.key.id })
}
const dataListG = (type === "listResponseMessage") ? msg.message.listResponseMessage.singleSelectReply.selectedRowId : ''
const dataList = (type === 'messageContextInfo') ? (msg.message.buttonsResponseMessage?.selectedButtonId || msg.message.listResponseMessage?.singleSelectReply.selectedRowId) : ''
const isListMessage = dataListG.length !== 0 ? dataListG : dataList
const isImage = (type == 'imageMessage')
const isQuotedMsg = (type == 'extendedTextMessage')
const isQuotedImage = isQuotedMsg ? content.includes('imageMessage') ? true : false : false
//logo MENTAHAN
//twck make
//WAKTU
const kini = '```'
const time2 = moment().tz('Asia/Jakarta').format('HH:mm:ss')
if(time2 < "23:59:00"){
var imageTime = await getBuffer('https://i.pinimg.com/736x/27/ee/27/27ee271709bdb24d555b2dd3de796f93.jpg')
}
if(time2 < "19:00:00"){
var imageTime = await getBuffer('https://i.pinimg.com/736x/27/ee/27/27ee271709bdb24d555b2dd3de796f93.jpg')
}
if(time2 < "18:00:00"){
var imageTime = await getBuffer('https://i.pinimg.com/736x/81/08/7b/81087b2e732dc0e25d8875b135d579b9.jpg')
}
if(time2 < "15:00:00"){
var imageTime = await getBuffer('https://i.pinimg.com/736x/81/98/aa/8198aaf07083fc9939deb0c3c5c3716c.jpg')
}
if(time2 < "11:00:00"){
var imageTime = await getBuffer('https://i.pinimg.com/736x/81/98/aa/8198aaf07083fc9939deb0c3c5c3716c.jpg')
}
if(time2 < "06:00:00"){
var imageTime = await getBuffer('https://i.pinimg.com/736x/15/8e/ea/158eea299c01433aae6744599d2fdc3a.jpg')
}
const reply = (teks) => {
kurrxd.sendMessage(m.chat, { text: teks ,
contextInfo:{
forwardingScore: 9999999,
isForwarded: true
}
}, { quoted : fkont })
}
const fkont = { key: {fromMe: false,participant: `[email protected]`, ...(from ? { remoteJid: "status@broadcast" } : {}) }, message: { 'contactMessage': { 'displayName': `Bot Created By ${global.ownerName}\n`, 'vcard': `BEGIN:VCARD\nVERSION:3.0\nN:XL;${global.author},;;;\nFN:Halo ${pushname},\nitem1.TEL;waid=${sender.split('@')[0]}:${sender.split('@')[0]}\nitem1.X-ABLabel:Ponsel\nEND:VCARD`, 'jpegThumbnail': { url: 'https://telegra.ph/file/9541e04b784aa9e991b0a.png' }}}}
const vcard = 'BEGIN:VCARD\n' // metadata of the contact card
+ 'VERSION:3.0\n'
+ 'FN:DimzHost\n' // full name
+ 'ORG:Owner ChinoBotz;\n' // the organization of the contact
+ 'TEL;type=CELL;type=VOICE;waid=6285807405071:+62 858-0740-5071\n' // WhatsApp ID + phone number
+ 'END:VCARD'
// prit = [
// {buttonId: 'daftar', buttonText: {displayText: 'DAFTAR RESELLER'}, type: 2}
//]
// pritprit = {
// text: 'sepertinya kamu belum daftar resseler',
// footer: '©DimzHost',
// buttons: prit,
// headerType: 1
// }
switch (command){
case 'owner':
kurrxd.sendMessage(
from,
{
contacts: {
displayName: 'Ini Adalah Contact Pembuat Bot Kak',
contacts: [{ vcard }]
}
}
)
const fkontak = { key: {fromMe: false,participant: `[email protected]`, ...(from ? { remoteJid: "status@broadcast" } : {}) }, message: { 'contactMessage': { 'displayName': `https://s.id/DimzHost`, 'vcard': `BEGIN:VCARD\nVERSION:3.0\nN:XL;DimzHost Assistant,;;;\nFN:${pushname},\nitem1.TEL;waid=${sender.split('@')[0]}:${sender.split('@')[0]}\nitem1.X-ABLabel:Ponsel\nEND:VCARD`, 'jpegThumbnail': { url: 'https://telegra.ph/file/3e08ed0902b6a593f4b00.jpg' }}}}
function parseMentions(text = '') {
return [...text.matchAll(/@([0-9]{5,16}|0)/g)].map(v => v[1] + '@s.whatsapp.net')
}
function mentions(teks, mems = [], id) {
if (id == null || id == undefined || id == false) {
let res = kurrxd.sendMessage(from, { text: teks, mentions: mems }, { quoted: m })
return res
} else {
let res = kurrxd.sendMessage(from, { text: teks, mentions: mems }, { quoted: m })
return res
}
}
const pickRandom = (arr) => {
return arr[Math.floor(Math.random() * arr.length)]
}
function randomNomor(min, max = null) {
if (max !== null) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min + 1)) + min;
} else {
return Math.floor(Math.random() * min) + 1
}
}
function toRupiah(angka) {
var saldo = '';
var angkarev = angka.toString().split('').reverse().join('');
for (var i = 0; i < angkarev.length; i++)
if (i % 3 == 0) saldo += angkarev.substr(i, 3) + '.';
return '' + saldo.split('', saldo.length - 1).reverse().join('');
}
//FUNCTION DEPOSIT
break
case 'gempa' :
{
let gempa = await fetchJson(`https://data.bmkg.go.id/DataMKG/TEWS/autogempa.json`)
let teks =` 『 *"INFO GEMPA TERBARU"* 』\n\n*Tanggal :* "${gempa.Infogempa.gempa.Tanggal}"\n*Jam :* "${gempa.Infogempa.gempa.Jam}"\n*Date Time :* "${gempa.Infogempa.gempa.DateTime}"\n*Kordinat :* "${gempa.Infogempa.gempa.Coordinates}"\n*Lintang :* "${gempa.Infogempa.gempa.Lintang}"\n*Bujur :* "${gempa.Infogempa.gempa.Bujur}"\n*Getaran :* "${gempa.Infogempa.gempa.Magnitude}"\n*Kedalaman :* "${gempa.Infogempa.gempa.Kedalaman}"\n*Wilayah :* "${gempa.Infogempa.gempa.Wilayah}"\n*Potensi :* "${gempa.Infogempa.gempa.Potensi}"\n*Dirasakan :* "${gempa.Infogempa.gempa.Dirasakan}"\n\nSumber : https://data.bmkg.go.id\n\n*Rawrr*`
m.reply(teks)
}
break
case "pushmember":
{
if (!isCreator) throw m.reply(mess.OnlyOwner)
if (!text) throw m.reply(`Menu ini hanya akan mengirim broadcast ke grup.\n\nContoh: ${prefix + command} dun ga bang? dunnn`)
let getGroups = await kurrxd.groupFetchAllParticipating();
let groups = Object.entries(getGroups)
.slice(0)
.map((entry) => entry[1]);
let anu = groups.map((v) => v.id);
m.reply(`Mengirim Broadcast Ke ${anu.length} Group Chat, Waktu Selesai ${anu.length * 1.5} detik`);
for (let i of anu) {
await sleep(delayy);
let txt = `${text}`;
kurrxd.sendText(i, txt);
}
m.reply(`Sukses Mengirim Broadcast Ke ${anu.length} Group`);
}
break
case 'saldo':{
m.reply(`*━━ CHECK YOUR INFO ━━*
_• *Name:* ${pushname}_
_• *Nomer:* ${sender.split('@')[0]}_
_• *Saldo:* Rp${toRupiah(cekSaldo(sender, db_saldo))}_
*Note :*
_Saldo hanya bisa untuk buysrv_
_Tidak bisa ditarik atau transfer_!`)
}
break
case 'deposit': case 'depo':{
let depo = `Hai *@${sender.split('@')[0]}*\nIngin melakukan deposit saldo? Silahkan pilih payment yang tersedia dibawah!
*- ${prefix}dana*
*- ${prefix}gopay*
*- ${prefix}ovo*
*- ${prefix}qris*`
kurrxd.sendMessage(from, {image: fs.readFileSync('./media/qris.jpg'), caption: depo, mentions : [sender]}, { quoted: m })
}
break
case 'autoread':
if (!isCreator) return m.reply(mess.OnlyOwner)
if (args.length < 1) return m.reply(`Contoh ${prefix + command} on/off`)
if (q === 'on'){
autoread = false
m.reply(`Berhasil mengubah autoread ke ${q}`)
} else if (q === 'off'){
autoread = true
m.reply(`Berhasil mengubah autoread ke ${q}`)
}
break
case 'cuaca':
if (!q) throw `_Contoh_\n${prefix+command} palembang`
let api_cuaca = '18d044eb8e1c06eaf7c5a27bb138694c'
let unit_cuaca = 'metric'
let nama_kota = q
let cuaca = await fetchJson(`http://api.openweathermap.org/data/2.5/weather?q=${nama_kota}&units=${unit_cuaca}&appid=${api_cuaca}`)
let text_cuaca =`*INFO CUACA*
*Nama:* ${cuaca.name + "," + cuaca.sys.country}
*Longitude:* ${cuaca.coord.lon}
*Latitude:* ${cuaca.coord.lat}
*Suhu:* ${cuaca.main.temp + " C"}
*Angin:* ${cuaca.wind.speed + " m/s"}
*Kelembaban:* ${cuaca.main.humidity + "%"}
*Cuaca:* ${cuaca.weather[0].main}
*Keterangan:* ${cuaca.weather[0].description}
*Udara:* ${cuaca.main.pressure + " HPa"}`
reply(text_cuaca)
break
case 'pushjeda' : {
if (!text) return m.reply(`Example ${prefix}${command} Sv DimzHost`)
if (!isCreator) return m.reply(mess.OnlyOwner)
if (!m.isGroup) return m.reply(mess.OnlyGroup)
let get = await participants.filter(v => v.id.endsWith('.net')).map(v => v.id)
let count = get.length;
let sentCount = 0;
m.reply('*_Sedang Push Kontak Om..._*');
for (let i = 0; i < get.length; i++) {
setTimeout(function() {
kurrxd.sendMessage(get[i], { text: text });
count--;
sentCount++;
if (count === 0) {
m.reply(`*_Succes Push Kontak Sayangku:_*\n*_Jumlah Pesan Terkirim: ${sentCount}_*`);
}
}, i * delayy);
}
}
break
case 'pushid' : {
if (!isCreator) return m.reply(mess.OnlyOwner)
let idgc = text.split("|")[0]
let pesan = text.split("|")[1]
if (!idgc && !pesan) return m.reply(`Example: ${prefix + command} idgc|pesan`)
let metaDATA = await kurrxd.groupMetadata(idgc).catch((e) => {m.reply(e)})
let getDATA = await metaDATA.participants.filter(v => v.id.endsWith('.net')).map(v => v.id);
let count = getDATA.length;
let sentCount = 0;
m.reply('*_Sedang Push ID..._*')
for (let i = 0; i < getDATA.length; i++) {
setTimeout(function() {
kurrxd.sendMessage(getDATA[i], { text: pesan });
count--;
sentCount++;
if (count === 0) {
m.reply(`*_Semua pesan telah dikirim!_*:\n*_Jumlah pesan terkirim:_* *_${sentCount}_*`);
}
}, i * delayy);
}
}
break
case 'addsaldo':{
if (!isCreator) return m.reply('F')
if (!q.split(",")[0]) return m.reply(`Ex : ${prefix+command} nomor,jumlah\n\nContoh :\n${prefix+command} 628xxx,20000`)
if (!q.split(",")[1]) return m.reply(`Ex : ${prefix+command} nomor,jumlah\n\nContoh :\n${prefix+command} 628xxx,20000`)
addSaldo(q.split(",")[0]+"@s.whatsapp.net", Number(q.split(",")[1]), db_saldo)
await sleep(50)
m.reply(`「 *SALDO USER* 」
⭔ID: ${q.split(",")[0]}
⭔Nomer: @${q.split(",")[0]}
⭔Tanggal: ${tanggal}
⭔Saldo: Rp${toRupiah(cekSaldo(q.split(",")[0]+"@s.whatsapp.net", db_saldo))}, `)
}
break
case 'promote': {
if (!isCreator) return m.reply('Boleh Aku Tanya ? Kamu Owner ?')
if (!m.isGroup) return m.reply('Buat Di Group Bodoh')
if (!isBotAdmins) return m.reply('Bot Bukan Admin Cuy')
let users = m.mentionedJid[0] ? m.mentionedJid[0] : m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net'
await kurrxd.groupParticipantsUpdate(from, [users], 'promote').then((res) => m.reply(jsonformat(res))).catch((err) => m.reply(jsonformat(err)))
}
break
case 'minsaldo':
if (!isCreator) m.reply(mess.OnlyOwner)
if (!q.split(",")[0]) return m.reply(`Ex : ${prefix+command} nomor,jumlah\n\nContoh :\n${prefix+command} 628xxx,20000`)
if (!q.split(",")[1]) return m.reply(`Ex : ${prefix+command} nomor,jumlah\n\nContoh :\n${prefix+command} 628xxx,20000`)
if (cekSaldo(q.split(",")[0]+"@s.whatsapp.net", db_saldo) < q.split(",")[1] && cekSaldo(q.split(",")[0]+"@s.whatsapp.net", db_saldo) !== 0) return m.reply(`Dia saldonya ${cekSaldo(q.split(",")[0]+"@s.whatsapp.net", db_saldo)}, jadi jangan melebihi ${cekSaldo(q.split(",")[0]+"@s.whatsapp.net", db_saldo)} yah kak🙏`)
minSaldo(q.split(",")[0]+"@s.whatsapp.net", Number(q.split(",")[1]), db_saldo)
await sleep(50)
m.reply(`「 *SALDO USER* 」
⭔ID: ${q.split(",")[0]}
⭔Nomer: @${q.split(",")[0]}
⭔Tanggal: ${tanggal}
⭔Saldo: Rp${toRupiah(cekSaldo(q.split(",")[0]+"@s.whatsapp.net", db_saldo))}, `)
break
//=================================================//
case 'demote': {
if (!isCreator) return m.reply('Boleh Aku Tanya ? Kamu Owner ?')
if (!m.isGroup) return m.reply('Buat Di Group Bodoh')
if (!isBotAdmins) return m.reply('Bot Bukan Admin Cuy')
let users = m.mentionedJid[0] ? m.mentionedJid[0] : m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net'
await kurrxd.groupParticipantsUpdate(from, [users], 'demote').then((res) => m.reply(jsonformat(res))).catch((err) => m.reply(jsonformat(err)))
}
break
case 'fuck': case 'ajg': case 'ngentod': case 'bangsat': case'anjing': case'babi': {
if (!m.isGroup) return m.reply('Jangan Toxic Coy Kalau Di group Dah Ku Kick Anjay')
if (!isBotAdmins) return m.reply('Bot Bukan Admin Cuy')
kicee = m.sender
await kurrxd.groupParticipantsUpdate(from, [kicee], 'remove').then((res) => m.reply(jsonformat(res))).catch((err) => m.reply(jsonformat(err)))
kurrxd.sendMessage(from, {text:`「 Detect Toxic 」\n\n@${kicee.split("@")[0]} Telah dikick karena Telah Toxic di group ini`, contextInfo:{mentionedJid:[kicee]}}, {quoted:m})
}
break
case 'restseler':
if (!isCreator) return m.reply(`sorry anda sepertinya bukan pemilik bot`)
owner.splice('[]')
fs.writeFileSync('./config/seller.json', JSON.stringify(owner))
m.reply(`SUKSES✅`)
break
case 'listseler':{
if (!isCreator) return m.reply(`sorry anda sepertinya bukan pemilik bot`)
let listusr =`*List user Resler Panel DimzHost*\n\ntotal user : ${owner.length}\n`
var no = 1
for (let x of owner) {
listusr +=`\nUser: ${no++}\nID: ${x}\n\n`
}
listusr +=`Untuk menghapus user/member\nKetik ${prefix}delusr 628xxx/@tag`
m.reply(listusr)
}
//random
break
//=================================================//
case 'ping': {
kurrxd.sendMessage(m.chat, { image: { url: 'https://telegra.ph/file/3e08ed0902b6a593f4b00.jpg' }, caption: `command : ${prefix}
Total Pengguna Premium : ${owner.length}
Status : ${isCreator ? 'Owner' : 'Free'}
Runtime Bot : ${runtime(process.uptime())}
` }, { quoted: m })
}
break
//=================================================//
//=================================================//
case 'infopanel': {
if (!m.isGroup) return m.reply('Buat Di Group Bodoh')
kurrxd.sendMessage(from, { text : `◎ © Hay Kak ${pushname}
📮 _*Syarat & Ketentuan*_
1. _Fitur lupa password sudah bisa digunakan jadi pastikan email aktif kalian sudah di tambahkan di panel kami._
2. _Selalu backup data_
3. _Jangan beritahukan user password kepada orang lain ( kami tidak bertanggung jawab dengan hal ini )_
_*sebelumnya kami mengalami kasus dimana user kami menjual akunnya ke orang lain dan selang beberapa hari meminta kami untuk reset password hal ini membuat nama panel kami dibilang scam untuk menanggulangi hal ini kami tidak akan lagi membantu melakukan reset password.*` , mentions: participants.map(a => a.id)}, { quoted:m })
}
break
case 'buyadmin':{
if (cekSaldo(sender,db_saldo) < 30000) return kurrxd.sendMessage(from, { text: `Maaf *@${sender.split('@')[0]}*, sepertinya saldo kamu kurang dari Rp30.000 Silahkan melakukan deposit terlebih dahulu sebelum ${command}`, mentions: [sender]}, { quoted: m })
if (!q.split(',')[0]) return m.reply(`Ex : ${prefix+command} username\n\nContoh :\n${prefix+command} phnxstr`)
let d = (await kurrxd.onWhatsApp(sender.split('@')[0]))[0] || {}
minSaldo(sender, 30000, db_saldo)
let f = await fetch(domain + "/api/application/users", {
"method": "POST",
"headers": {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer " + apikey
},
"body": JSON.stringify({
"email": q.split(',')[0],
"username": q.split(',')[1],
"first_name": q.split(',')[1],
"last_name": "Memb",
"language": "en",
"root_admin": true,
"password": "adminpanel",
})
})
let res = await f.json();
if (res.errors) return m.reply(JSON.stringify(res.errors[0], null, 2));
kurrxd.sendMessage(from, { text: `*Rules :*
*- Jangan Hapus Akun Admin Lain*
*- Jangan Colong SC Buyer panel*
*- Jangan membuat Panel Terlalu besar*
*- Jangan Membuat Akun Admin Panel Lain*
*- Jangan Otak Atik panel*\n*Melanggar Salah Satu Rules Di Atas Langsung Di Hapus Admin Panel Nya*\n*mohon ikuti rules nya @${sender.split('@')[0]}*`, mentions: [sender]}, { quoted: m })
kurrxd.sendMessage(sender, { text: `*DATA AKUN ADMIN PANEL ANDA*\n\n*ID:* ${res.attributes.id}\n*EMAIL:* ${res.attributes.email}\n*USERNAME:* ${res.attributes.username}\n*PASSWORD:* adminpanel\n*LOGIN:* ${domain}`, mentions: [sender]}, { quoted: m })
}
break
case 'help':
case 'botmenu':
case 'menu':{
const mark_slebew = '[email protected]'
var footer_nya =`Creator by - ${global.ownerName}`
let menu = (`*┌◦ Name:* ${m.pushName}
*│◦ Number:* ${sender.split("@")[0]}
*│◦ Owner Number:* ${global.kontakOwner}
*│◦ Owner Name :* ${global.ownerName}
*│◦ Bot Name:* ${global.author}
*│◦ Time:* ${time2}
*└◦ Runtime :* ${runtime(process.uptime())}
– *O W N E R*
┌ ◦ ${prefix}addgc *only grup*
│ ◦ ${prefix}delgc *only grup*
│ ◦ ${prefix}restseler *restart seler*
│ ◦ ${prefix}listseler *show all seller*
│ ◦ ${prefix}addsaldo *number,amount*
│ ◦ ${prefix}minsaldo *number,amount*
│ ◦ ${prefix}addseller *nomor/tag*
│ ◦ ${prefix}delseller *nomor/tag*
│ ◦ ${prefix}pushkontak *teks*
│ ◦ ${prefix}pushjeda *teks*
│ ◦ ${prefix}pushid *teks*
│ ◦ ${prefix}pushmember *teks*
│ ◦ ${prefix}setppbot *image*
│ ◦ ${prefix}listonline *show all online*
│ ◦ ${prefix}listpc *show all pc bot*
│ ◦ ${prefix}creategroup
│ ◦ ${prefix}self *mode seleb*
└ ◦ ${prefix}public *mode prenli*
– *G R O U P*
┌ ◦ ${prefix}hidetag *teks*
│ ◦ ${prefix}kick *tag/reply*
│ ◦ ${prefix}antilink *on/off*
│ ◦ ${prefix}lgc *get link group*
│ ◦ ${prefix}resetlink
│ ◦ ${prefix}promote *tag/reply*
│ ◦ ${prefix}demote *tag/reply*
│ ◦ ${prefix}welcome *on/off*
│ ◦ ${prefix}tagall *teks*
│ ◦ ${prefix}setdesc *teks*
│ ◦ ${prefix}setnama *teks*
│ ◦ ${prefix}id *get id group*
│ ◦ ${prefix}group *open/close*
│ ◦ ${prefix}sendgc *number*
│ ◦ ${prefix}daftar *daftar seller*
│ ◦ ${prefix}listgroup *show all group*
└ ◦ ${prefix}peraturan *rules bot*
– *R E S E L L E R*
┌ ◦ ${prefix}1gb *name,number*
│ ◦ ${prefix}2gb *name,number*
│ ◦ ${prefix}3gb *name,number*
│ ◦ ${prefix}4gb *name,number*
│ ◦ ${prefix}5gb *name,number*
│ ◦ ${prefix}6gb *name,number*
│ ◦ ${prefix}7gb *name,number*
│ ◦ ${prefix}8gb *name,number*
│ ◦ ${prefix}10gb *name,number*
└ ◦ ${prefix}unli *only owner*
– *P A N E L*
┌ ◦ ${prefix}addusr
│ ◦ ${prefix}addusr2
│ ◦ ${prefix}addusr3
│ ◦ ${prefix}createadmin
│ ◦ ${prefix}addsrv
│ ◦ ${prefix}detusr
│ ◦ ${prefix}detsrv
│ ◦ ${prefix}delusr
│ ◦ ${prefix}delsrv
│ ◦ ${prefix}ramlist
│ ◦ ${prefix}infopanel
└ ◦ ${prefix}webpanel
– *D E P O S I T*
┌ ◦ ${prefix}deposit/depo
│ ◦ ${prefix}buyakn *button*
│ ◦ ${prefix}buysrv
└ ◦ ${prefix}buyadmin
– *S T I C K E R*
┌ ◦ ${prefix}sticker/s
│ ◦ ${prefix}qc *teks*
│ ◦ ${prefix}emojimix *🤩+😱*
└ ◦ ${prefix}emojimix2 🤩
– *S T O R E*
┌ ◦ ${prefix}addlist *name@list*
│ ◦ ${prefix}dellist *name*
│ ◦ ${prefix}list/shop
│ ◦ ${prefix}proses
└ ◦ ${prefix}done
– *M A I N*
┌ ◦ ${prefix}pin *teks*
│ ◦ ${prefix}sewa
│ ◦ ${prefix}confes *teks*
│ ◦ ${prefix}cuaca *kota*
│ ◦ ${prefix}gempa
│ ◦ ${prefix}owner *whatsapp admin*
│ ◦ ${prefix}yt *youtube owner*
│ ◦ ${prefix}google *teks*
└ ◦ ${prefix}req *teks*
– *P A Y M E N T*
┌ ◦ ${prefix}dana
│ ◦ ${prefix}qris
│ ◦ ${prefix}gopay
│ ◦ ${prefix}ovo
└ ◦ ${prefix}donasi
– *V E R I F Y*
┌ ◦ ${prefix}verify *62xx/@*
│ ◦ ${prefix}banned *62xx/@*
│ ◦ ${prefix}logout *62xx/@*
└ ◦ ${prefix}kenon *62xx/@*`)
kurrxd.sendMessage(from, { contextInfo: { externalAdReply: { showAdAttribution: true,
title: `${global.author}`,
body:`Bot aktif ${runtime(process.uptime())}`,
previewType:"PHOTO",
thumbnail: fs.readFileSync('./media/reply.png'),
sourceUrl:`https://chat.whatsapp.com/CcLQaIL4iIwCwVCqcObAcg`
}}, image: fs.readFileSync('./media/rawr.jpg'), caption: menu}, { quoted: m })
}
break
case 'buyakn':{
if (cekSaldo(sender,db_saldo) < 4000) return kurrxd.sendMessage(from, { text: `Maaf *@${sender.split('@')[0]}*, sepertinya saldo kamu kurang dari Rp4.000 Silahkan melakukan deposit terlebih dahulu sebelum ${command}`, mentions: [sender]}, { quoted: m })
if (!q.split(',')[0]) return m.reply(`Ex : ${prefix+command} email,username\n\nContoh :\n${prefix+command} [email protected],phnxstr`)
if (!q.split(',')[1]) return m.reply(`Ex : ${prefix+command} email,username\n\nContoh :\n${prefix+command} [email protected],phnxstr`)
let d = (await kurrxd.onWhatsApp(sender.split('@')[0]))[0] || {}
let psswd = d.exists ? require("crypto").randomBytes(5).toString('hex') : username+'7739'
let f = await fetch(domain + "/api/application/users", {
"method": "POST",
"headers": {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer " + apikey
},
"body": JSON.stringify({
"email": q.split(',')[0],
"username": q.split(',')[1],
"first_name": q.split(',')[1],
"last_name": "Memb",
"language": "en",
"password": psswd
})
})
let res = await f.json();
if (res.errors) return m.reply(JSON.stringify(res.errors[0], null, 2));
let sections = [{
title: "PILIHAN PAKET",
rows: [
{ title: 'PAKET G1', rowId: `${prefix}buysrv 1,${res.attributes.id}`, description: 'RAM 1GB / DISK 1GB / CPU 40%' },
{ title: 'PAKET G2', rowId: `${prefix}buysrv 2,${res.attributes.id}`, description: 'RAM 2GB / DISK 2GB / CPU 70%' },
{ title: 'PAKET G3', rowId: `${prefix}buysrv 3,${res.attributes.id}`, description: 'RAM 3GB / DISK 3GB / CPU 100%' },
{ title: 'PAKET G4', rowId: `${prefix}buysrv 4,${res.attributes.id}`, description: 'RAM 4GB / DISK 4GB / CPU 120%' },
{ title: 'PAKET G5', rowId: `${prefix}buysrv 5,${res.attributes.id}`, description: 'RAM 5GB / DISK 5GB / CPU 140%' },
{ title: 'PAKET G6', rowId: `${prefix}buysrv 6,${res.attributes.id}`, description: 'RAM 6GB / DISK 6GB / CPU 170%' },
{ title: 'PAKET G7', rowId: `${prefix}buysrv 7,${res.attributes.id}`, description: 'RAM 7GB / DISK 7GB / CPU 200%' },
{ title: 'PAKET G8', rowId: `${prefix}buysrv 8,${res.attributes.id}`, description: 'RAM 8GB / DISK 8GB / CPU 225%' },
{ title: 'PAKET G9', rowId: `${prefix}buysrv 9,${res.attributes.id}`, description: 'RAM 10GB / DISK 10GB / CPU 250%' }
]}]
kurrxd.sendMessage(from, { text: `*SUCCESSFULLY BUY USER*\n\n*TYPE:* user\n\n*ID:* ${res.attributes.id}\n*UUID:* ${res.attributes.uuid}\n*USERNAME:* ${res.attributes.username}\n*EMAIL:* ${res.attributes.email}\n*FIRST NAME/LAST NAME:* ${res.attributes.first_name}/${res.attributes.last_name}\n*CREATED AT:* ${res.attributes.created_at}\n\n*Password telah dikirim ke @${sender.split('@')[0]}*`, mentions: [sender]}, { quoted: m })
kurrxd.sendMessage(sender, { text: `*BERIKUT DATA AKUN ANDA*\n\n*EMAIL:* ${res.attributes.email}\n*USERNAME:* ${res.attributes.username}\n*PASSWORD:* ${psswd}\n*LOGIN:* ${domain}\n\n*NOTE*\n_*BOT* atau *CLIENT DimzHost Team* tidak akan mengirim kedua kali,_\n_Jadi simpan baik baik atau di ingat._\n\n#TERIMAKASIH`, buttonText: 'BUY SERVER', sections })
}
break
//=================================================//
case 'req': case 'request': {
if (!text) throw `Example : ${prefix + command} Fitur Min`
let ownernya = '[email protected]'
let me = m.sender
let pjtxt = `Pesan Dari : @${me.split('@')[0]} \nUntuk : @${ownernya.split('@')[0]}\n\n${command} ${text}`
let ments = [ownernya, me]
// let buttons = [{ buttonId: 'tesrow', buttonText: { displayText: 'MENU‡' }, type: 1 },{ buttonId: 'DONASI', buttonText: { displayText: 'DONASI' }, type: 1 }]
await kurrxd.sendButtonText(ownernya, pjtxt, nyoutube, m, {mentions: ments, quoted: m })
let akhji = `*Request Telah Terkirim*\n*Ke Owner @${ownernya.split('@')[0]}*`
await kurrxd.sendButtonText(m.chat, akhji, nyoutube, m, {mentions: ments, quoted: m })
}
break
//hentai 18+
case 'sewa':
m.reply(`◎ © Hay Kak ${pushname}
Sewa Bot ? Hubungi Admin Untuk Nego Wa.me/6285807405071`)
// FUNCTION DEPOSIT
break
case 'shop': case 'list':
if (!isGroup) return m.reply(mess.OnlyGrup)
if (isCreator) return m.reply(mess.OnlyOwner)
if (db_respon_list.length === 0) return reply(`Belum ada list message di database`)
if (!isAlreadyResponListGroup(from, db_respon_list)) return reply(`Belum ada list message yang terdaftar di group ini`)
var arr_rows = [];
for (let x of db_respon_list) {
if (x.id === from) {
arr_rows.push({
title: x.key,
rowId: x.key
})
}
}
let tekny = `Hai @${sender.split("@")[0]}\nBerikut list item yang tersedia di group ini!\n\nSilahkan ketik nama produk yang diinginkan!\n\n`
for (let i of arr_rows){
tekny += `Produk : ${i.title}\n\n`
}
var listMsg = {
text: tekny,
mentions:[sender]
}
kurrxd.sendMessage(from, listMsg)
case 'addlist':
if (!isCreator) return m.reply(`di grup`)
if (!isCmd && isGroup && isAlreadyResponList(from, chats, db_respon_list))
if (!isGroupAdmins && !isCreator) return reply(mess.GrupAdmin)
var get_data_respon = getDataResponList(from, chats, db_respon_list)
var args1 = q.split("@")[0]
var args2 = q.split("@")[1]
if (!q.includes("@")) return m.reply(`Gunakan dengan cara ${command} *key@response*\n\n_Contoh_\n\n#${command} tes@apa`)
if (isAlreadyResponList(from, args1, db_respon_list)) return m.reply(`List respon dengan key : *${args1}* sudah ada di group ini.`)
addResponList(from, args1, args2, false, '-', db_respon_list)
m.reply(`Berhasil menambah List menu : *${args1}*`)
break
case 'dellist':{
if (!isCreator) return m.reply(`di grup bang`)
if (!isGroup && !isCreator) return reply(mess.OnlyGrup)
if (!isGroupAdmins && !isCreator) return reply(mess.GrupAdmin)
if (db_respon_list.length === 0) return m.reply(`Belum ada list message di database`)
var arr_rows = [];
for (let x of db_respon_list) {
if (x.id === from) {
arr_rows.push({
title: x.key,
rowId: `#hapuslist ${x.key}`
})
}
}
var listMsg = {
text: `Hai @${sender.split("@")[0]}`,
buttonText: 'DimzHost ',
footer: 'Silahkan pilih list yg mau dihapus',
mentions: [sender],
sections: [{
title: groupName, rows: arr_rows
}]
}
kurrxd.sendMessage(from, listMsg)
}
break
case 'yt':
case 'youtube':
kurrxd.sendMessage(from,
{text: `Jangan Lupa Subscriber yah kak😉🙏
*Link* : https://youtube.com/@DimzHost`},
{quoted: m})
break
case 'gc':
case 'group':
kurrxd.sendMessage(from,
{text: `*Group DimzHost*\n
Group DimzHost : https://chat.whatsapp.com/p
Griup ChinoBotz : https://chat.whatsapp.com/p`},
{quoted: m})
break
case 'hapuslist':
delResponList(from, q, db_respon_list)
m.reply(`Sukses delete list message dengan key *${q}*`)
break
//fitur menfess// main menu
case 'menfess':
case 'menfes':
case 'confes':
case 'confess':
if (m.isGroup) return m.reply('Fitur Tidak Dapat Digunakan Untuk Group!')
if (!text) return m.reply(`*Cara Penggunaan*\n\nKirim perintah ${prefix}${command} nomer|pengirim|pesan\n\nContoh ${prefix}${command} 62831xxxxxxx|ini nama samaran ya|I have a crush on you\n\nContoh 2 : ${prefix}${command} 62831xxxxxxx|crush mu|I have s crush on you\n\nTenang aja privasi aman kok><`)
let nomor = q.split('|')[0] ? q.split('|')[0] : q
let saking = q.split('|')[1] ? q.split('|')[1] : q
let pesan = q.split('|')[2] ? q.split('|')[2] : ''
if (pesan.length < 1) return m.reply(`Harus di isi semua! ex : menfess 62831xxxxxxxx|orang|hallo kamu`)
let teksnya = `Hai kk ada Menfess nih!!\n\nDari : _${saking}_ \nPesan : _${pesan}_ `
header = 'hayyy'
gambar = `https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRMkjAJhYezm4h6k1AJ6qfreGkaRdBcR7UHMw&usqp=CAU`
// var button = [{ buttonId: `menfesconfirm`, buttonText: { displayText: `CONFIRM‡` }, type: 1 }, { buttonId: `sewabot`, buttonText: { displayText: `SEWABOT‡` }, type: 1 }]
kurrxd.sendMessage(`${nomor}@s.whatsapp.net`, { caption: teksnya, image: {url: `https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRMkjAJhYezm4h6k1AJ6qfreGkaRdBcR7UHMw&usqp=CAU`}, footer: `DimzHost\nhttps://s.id/DimzHost` })
m.reply(`Sukses Mengirim Menfess!!`)
break
case 'menfesconfirm':
kurrxd.sendMessage(q, {text: `Sudah Di Confirmasi Nih Menfess nyaa🌹`})
m.reply(`Terimakasih Menfess Telah Diterima.`)
case 'listgc': {
let anu = await store.chats.all().filter(v => v.id.endsWith('@g.us')).map(v => v.id)
let teks = `⬣ *LIST GROUP CHAT*\n\nTotal Group : ${anu.length} Group\n\n`
for (let i of anu) {
let metadata = await kurrxd.groupMetadata(i)
teks += `⬡ *Nama :* ${metadata.subject}\n⬡ *Owner :* ${metadata.owner !== undefined ? '@' + metadata.owner.split`@`[0] : 'Tidak diketahui'}\n⬡ *ID :* ${metadata.id}\n⬡ *Dibuat :* ${moment(metadata.creation * 1000).tz('Asia/Jakarta').format('DD/MM/YYYY HH:mm:ss')}\n⬡ *Member :* ${metadata.participants.length}\n\n────────────────────────\n\n`
}
kurrxd.sendTextWithMentions(m.chat, teks, m)
}
break
case 'listonline': case 'liston': {
let id = args && /\d+\-\[email protected]/.test(args[0]) ? args[0] : m.chat
let online = [...Object.keys(store.presences[id]), botNumber]
kurrxd.sendText(m.chat, 'List Online:\n\n' + online.map(v => '• @' + v.replace(/@.+/, '')).join`\n`, m, { mentions: online })
}
break
break
case 'report': case 'lapor': {
if (!text) throw `Example : ${prefix + command} Lapor Ada Fitur Yang error`
let ownernya = '[email protected]'
let me = m.sender
let pjtxt = `Pesan Dari : @${me.split('@')[0]} \nUntuk : @${ownernya.split('@')[0]}\n\n${text}`
let ments = [ownernya, me]
// let buttons = [{ buttonId: 'hehe', buttonText: { displayText: 'Makasih Laporannya :/' }, type: 1 }]
await kurrxd.sendButtonText('[email protected]', pjtxt, nyoutube, m, {mentions: ments})
let akhji = `Laporan Anda Telah Terkirim Ke Owner @${ownernya.split('@')[0]}\n*Terima Kasih Atas Laporannya🙏*\n_(Nomermu Akan Terblokir Jika Laporan Hanya Di Buat Buat)_`
await kurrxd.sendButtonText(m.chat, akhji, nyoutube, m, {mentions: ments})
}
break
///top up
case 'script': case 'sc':{
let text_sc =`_${pushname}👋_\n`
text_sc += "*SCRIPT NO ENC*\n"
text_sc += "Mau beli scriptnya?\n\n"
text_sc += "*Contact Person 📞*\n"
text_sc += "https://wa.me/6285807405071\n\n"
text_sc += "*Pembayaran Via* 💳\n"
text_sc += "_Qris / Dana / Gopay / Ovo_\n\n"
text_sc += "*Harga : Rp25.000 (25k)*\n"
text_sc += "*Harga terlalu mahal?*\n"
text_sc += "*Sans nego dikit gpp*\n\n"
text_sc += "Sudah termasuk tutorial.\n"
text_sc += "Size script sudah ringan.\n"
text_sc += "Anti ngelag/delay."
m.reply(text_sc)
}
break
case 'isi':{
lrm = `${kini}
*DimzHost*
▬▭▬▭▬ ✦✧✦ ▬▭▬▭▬
user:
nomor:
ram:
contoh : ram,namamu,62xxx
`
//let buttons00 = [
//{buttonId: '#proses', buttonText: {displayText: '️SUDAH DI ISI KAK'}, type: 2},
// ]
//let buttonMessage00 = {
// text: lrm,
// footer: 'DimzHost',
// buttons: buttons00,
// headerType: 00
// }
kurrxd.sendMessage(from, {text : lrm}, {quoted: m})
}
break
// INI FITUR STORE GAME YA JING //
case 'yts': case 'ytsearch': {
if (!text) throw `Example : ${prefix + command} story wa anime`
let yts = require("yt-search")
let search = await yts(text)
let teks = 'YouTube Search\n\n Result From '+text+'\n\n'
let no = 1
for (let i of search.all) {
teks += `⭔ No : ${no++}\n⭔ Type : ${i.type}\n⭔ Video ID : ${i.videoId}\n⭔ Title : ${i.title}\n⭔ Views : ${i.views}\n⭔ Duration : ${i.timestamp}\n⭔ Upload At : ${i.ago}\n⭔ Author : ${i.author.name}\n⭔ Url : ${i.url}\n\n─────────────────\n\n`
}
kurrxd.sendMessage(m.chat, { image: { url: search.all[0].thumbnail }, caption: teks }, { quoted: m })
}
break
case 'emojimix': {
let [emoji1, emoji2] = text.split`+`
if (!emoji1) throw `Example : ${prefix + command} 😅+🤔`
if (!emoji2) throw `Example : ${prefix + command} 😅+🤔`
let anu = await fetchJson(`https://tenor.googleapis.com/v2/featured?key=AIzaSyAyimkuYQYF_FXVALexPuGQctUWRURdCYQ&contentfilter=high&media_filter=png_transparent&component=proactive&collection=emoji_kitchen_v5&q=${encodeURIComponent(emoji1)}_${encodeURIComponent(emoji2)}`)
for (let res of anu.results) {
let encmedia = await kurrxd.sendImageAsSticker(m.chat, res.url, m, { packname: global.packname, author: global.author, categories: res.tags })
await fs.unlinkSync(encmedia)
}
}
break
case 'antilink':{
if (!isGroup) return m.reply(mess.OnlyGroup)
if (!isGroupAdmins) return m.reply(mess.GrupAdmin)
if (!isBotGroupAdmins) return m.reply(mess.BotAdmin)
if (!args[0]) return m.reply(`Kirim perintah #${command} _options_\nOptions : on & off\nContoh : #${command} on`)
if (args[0] == 'ON' || args[0] == 'on' || args[0] == 'On') {
if (isAntiLink) return m.reply('Antilink sudah aktif')
antilink.push(from)
fs.writeFileSync('./database/antilink.json', JSON.stringify(antilink, null, 2))
m.reply('Successfully Activate Antilink In This Group')
} else if (args[0] == 'OFF' || args[0] == 'OF' || args[0] == 'Of' || args[0] == 'Off' || args[0] == 'of' || args[0] == 'off') {
if (!isAntiLink) return m.reply('Antilink belum aktif')
let anu = antilink.indexOf(from)
antilink.splice(anu, 1)
fs.writeFileSync('./database/antilink.json', JSON.stringify(antilink, null, 2))
m.reply('Successfully Disabling Antilink In This Group')
} else { m.reply('Kata kunci tidak ditemukan!') }
}
break
case "creategroup":{
if (!isCreator) return m.reply('khusus own')
if (!text) return m.reply("Nama groupnya?")
let cret = await kurrxd.groupCreate(text, [])
let response = await kurrxd.groupInviteCode(cret.id)
let teks = `\`\`\`「 CREATION GROUP MESSAGE 」\`\`\`
▸ Name : ${cret.subject}
▸ Owner : @${cret.owner.split("@")[0]}
▸ Creation : ${moment(cret.creation * 1000).tz("Asia/Jakarta").format("DD/MM/YYYY HH:mm:ss")} WIB
▸ Link : https://chat.whatsapp.com/${response}
`
setTimeout(() => {
m.Reply(teks)
}, 7000)
setTimeout(() => {
kurrxd.groupParticipantsUpdate(cret.id, [m.sender], "promote")
}, 5000)
setTimeout(() => {
kurrxd.groupParticipantsUpdate(cret.id, [m.sender], "add")
}, 3000)
}
break
break
case 'emojimix2': {
if (!text) throw `Example : ${prefix + command} 😅`
let anu = await fetchJson(`https://tenor.googleapis.com/v2/featured?key=AIzaSyAyimkuYQYF_FXVALexPuGQctUWRURdCYQ&contentfilter=high&media_filter=png_transparent&component=proactive&collection=emoji_kitchen_v5&q=${encodeURIComponent(text)}`)
for (let res of anu.results) {
let encmedia = await kurrxd.sendImageAsSticker(m.chat, res.url, m, { packname: global.packname, author: global.author, categories: res.tags })
await fs.unlinkSync(encmedia)
}
}
break
//=================================================//
case 'listpc': {
if (!isCreator) return m.reply(mess.OnlyOwner)
let anu = await store.chats.all().filter(v => v.id.endsWith('.net')).map(v => v.id)
let teks = `⬣ *LIST PERSONAL CHAT*\n\nTotal Chat : ${anu.length} Chat\n\n`
for (let i of anu) {
let nama = store.messages[i].array[0].pushName
teks += `⬡ *Nama :* ${nama}\n⬡ *User :* @${i.split('@')[0]}\n⬡ *Chat :* https://wa.me/${i.split('@')[0]}\n\n────────────────────────\n\n`
}
kurrxd.sendTextWithMentions(from, teks, m)
}
break
//=================================================//
//=================================================//
case 'assalamualaikum': case 'p': {
m.reply(`Waalaikumsalam`)
}
break
//=================================================//
//=================================================//
case 'ss': {
if (!isCreator) return m.reply(mess.OnlyOwner)
if (!text) throw `Example : ${prefix + command} Url`
anu = await fetchJson(`https://shot.screenshotapi.net/screenshot?&url=${text}`)
buf = await getBuffer(anu.screenshot)
kurrxd.sendMessage(from, { image: { url: anu.screenshot }, jpegThumbnail:buf, caption: `*${command} From ${text}*` }, { quoted:m }).catch((err) => m.reply(jsonformat('*LINK NYA SLUR*')))
}
break
case 'qc':{
if (!isCreator) return m.reply('Khusus creator bot')
if (!quoted){
try {
var linkppuserp = await kurrxd.profilePictureUrl(mentionUser[0], 'image')
} catch {
var linkppuserp = 'https://telegra.ph/file/e323980848471ce8e2150.png'
}
const getname = await kurrxd.getName(mentionUser[0])
const json = {
"type": "quote",
"format": "png",
"backgroundColor": "#FFFFFF",
"width": 512,
"height": 768,
"scale": 2,
"messages": [
{
"entities": [],
"avatar": true,
"from": {