-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathbase.js
More file actions
1977 lines (1880 loc) · 67.9 KB
/
base.js
File metadata and controls
1977 lines (1880 loc) · 67.9 KB
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
/*
> Recode script give credits to›
KINGVON
📝 | Created By KINGVON
🖥️ | Base by KINGVON
📝 | Created By KINGVON
📌 |Credits KINGVON
📱 |Chat wa:254720326316
👑 |Github: SilverTosh
✉️ |Email: kingvon64tho@gmail.com
*/
require('./configure')
const {
default: baileys,
proto,
jidNormalizedUser,
generateWAMessage,
generateWAMessageFromContent,
getContentType,
prepareWAMessageMedia,
} = require("@whiskeysockets/baileys");
const os = require('os')
const fs = require('fs')
const fsx = require('fs-extra')
const path = require('path')
const util = require('util')
const { color } = require('./list/lib/color')
const chalk = require('chalk')
const moment = require('moment-timezone')
const cron = require('node-cron')
const speed = require('performance-now')
const ms = toMs = require('ms')
const axios = require('axios')
const fetch = require('node-fetch')
const yts = require('yt-search')
const ytdl= require ('ytdl-core')
const gis = require('g-i-s')
const cheerio = require('cheerio')
const { randomBytes } = require('crypto')
const fg = require('api-dylux')
const googleTTS = require('google-tts-api')
const {translate} = require('@vitalets/google-translate-api')
const scp2 = require('./list/lib/scrape2')
const absenData = {};
const { temporary, temmp } = require('./list/tempor')
const basepic = fs.readFileSync('./Media/basepic.jpg')
const {
exec,
spawn,
execSync
} = require("child_process")
const {
performance
} = require('perf_hooks')
const more = String.fromCharCode(8206)
const readmore = more.repeat(4001)
const {
TelegraPh,
UploadFileUgu,
webp2mp4File,
floNime
} = require('./list/lib/uploader')
const {
addPremiumUser,
getPremiumExpired,
getPremiumPosition,
expiredPremiumCheck,
checkPremiumUser,
getAllPremiumUser,
} = require('./list/lib/premiun')
const {
toAudio,
toPTT,
toVideo,
ffmpeg,
addExifAvatar
} = require('./list/lib/converter')
const {
smsg,
getGroupAdmins,
formatp,
formatDate,
getTime,
isUrl,
await,
tanggal,
telegraPh,
sleep,
clockString,
msToDate,
sort,
toNumber,
enumGetKey,
runtime,
fetchJson,
getBuffer,
json,
delay,
toIDR,
capital,
format,
logic,
generateProfilePicture,
parseMention,
getRandom,
pickRandom,
fetchBuffer,
buffergif,
GroupDB,
kickQueue,
totalcase
} = require('./list/lib/func')
const orgkaya = fs.readFileSync('./list/Database/premium.json')
const owner = JSON.parse(fs.readFileSync('./list/Database/owner.json'))
const isPremium = owner || owner|| checkPremiumUser(m.sender, orgkaya);
global.db.data = JSON.parse(fs.readFileSync('./list/Database/database.json'))
if (global.db.data) global.db.data = {
sticker: {},
database: {},
game: {},
others: {},
users: {},
chats: {},
settings: {},
...(global.db.data || {})
}
let vote = db.data.others.vote = []
let kuismath = db.data.game.math = []
const xtime = moment.tz('Africa/Nairobi').format('HH:mm:ss')
const xdate = moment.tz('Africa/Nairobi').format('DD/MM/YYYY')
const time2 = moment().tz('Africa/Nairobi').format('HH:mm:ss')
if(time2 < "23:59:00"){
var tennortimewisher = `Good Night mofo🌌`
}
if(time2 < "19:00:00"){
var tennortimewisher = `Good Evening mofo🌃`
}
if(time2 < "18:00:00"){
var tennortimewisher = `Good Evening mofo🌃`
}
if(time2 < "15:00:00"){
var tennortimewisher = `Good Afternoon mofo🌅`
}
if(time2 < "11:00:00"){
var tennortimewisher = `Good Morning mofo 🌄`
}
if(time2 < "05:00:00"){
var tennortimewisher = `Good Morning mofo🌄`
}
const time = moment().tz("Africa/Nairobi").format("HH:mm:ss");
let ucapanWaktu
if (time >= "19:00:00" && time < "23:59:00") {
ucapanWaktu = "🌃 Early Morning"
} else if (time >= "15:00:00" && time < "19:00:00") {
ucapanWaktu = "🌄GoodMorning"
} else if (time >= "11:00:00" && time < "15:00:00") {
ucapanWaktu = "🏞️GoodAfternoon"
} else if (time >= "06:00:00" && time < "11:00:00") {
ucapanWaktu = "🏙️Goodevening"
} else {
ucapanWaktu = "🌆Goodnight"
};
//function
const reSize = async(buffer, ukur1, ukur2) => {
return new Promise(async(resolve, reject) => {
let jimp = require('jimp')
var baper = await jimp.read(buffer);
var ab = await baper.resize(ukur1, ukur2).getBufferAsync(jimp.MIME_JPEG)
resolve(ab)
})
}
function capitaler(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
//module
module.exports = bot = async (bot, m, chatUpdate, store) => {
try {
const {
type,
quotedMsg,
mentioned,
now,
fromMe
} = m
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 : '')
//prefix 1
var prefix = ['+', '/',','] ? /^[°•π÷×¶∆£¢€¥®™+✓_=|~!?@#$%^&.©^]/gi.test(body) ? body.match(/^[°•π÷×¶∆£¢€¥®™+✓_=|~!?@#$%^&.©^]/gi)[0] : "" : xprefix
const isCmd = body.startsWith(prefix, '')
const isCmd2 = body.startsWith(prefix)
const command = body.replace(prefix, '').trim().split(/ +/).shift().toLowerCase()
const command2 = body.slice(1).trim().split(/ +/).shift().toLowerCase()
const args = body.trim().split(/ +/).slice(1)
const full_args = body.replace(command, '').slice(1).trim()
const pushname = m.pushName || "No Name"
const botNumber = await bot.decodeJid(bot.user.id)
const itsMe = m.sender == botNumber ? true : false
const sender = m.sender
const text = q = args.join(" ")
const from = m.key.remoteJid
const fatkuns = (m.quoted || m)
const quoted = (fatkuns.mtype == 'buttonsMessage') ? fatkuns[Object.keys(fatkuns)[1]] : (fatkuns.mtype == 'templateMessage') ? fatkuns.hydratedTemplate[Object.keys(fatkuns.hydratedTemplate)[1]] : (fatkuns.mtype == 'product') ? fatkuns[Object.keys(fatkuns)[0]] : m.quoted ? m.quoted : m
const mime = (quoted.msg || quoted).mimetype || ''
const qmsg = (quoted.msg || quoted)
//media
const bugres = 'Sending bug process....'
const isMedia = /image|video|sticker|audio/.test(mime)
const isImage = (type == 'imageMessage')
const isVideo = (type == 'videoMessage')
const isAudio = (type == 'audioMessage')
const isDocument = (type == 'documentMessage')
const isLocation = (type == 'locationMessage')
const isContact = (type == 'contactMessage')
const isSticker = (type == 'stickerMessage')
const isText = (type == 'textMessage')
const isQuotedText = type === 'extendexTextMessage' && content.includes('textMessage')
const isQuotedImage = type === 'extendedTextMessage' && content.includes('imageMessage')
const isQuotedLocation = type === 'extendedTextMessage' && content.includes('locationMessage')
const isQuotedVideo = type === 'extendedTextMessage' && content.includes('videoMessage')
const isQuotedSticker = type === 'extendedTextMessage' && content.includes('stickerMessage')
const isQuotedAudio = type === 'extendedTextMessage' && content.includes('audioMessage')
const isQuotedContact = type === 'extendedTextMessage' && content.includes('contactMessage')
const isQuotedDocument = type === 'extendedTextMessage' && content.includes('documentMessage')
//prefix 2
const pric = /^#.¦|\\^/.test(body) ? body.match(/^#.¦|\\^/gi) : xprefix
const xeonybody = body.startsWith(pric)
const isCommand = xeonybody ? body.replace(pric, '').trim().split(/ +/).shift().toLowerCase() : ""
const sticker = []
//group
const isGroup = m.key.remoteJid.endsWith('@g.us')
const groupMetadata = m.isGroup ? await bot.groupMetadata(m.chat).catch(e => {}) : ''
const participants = m.isGroup ? await groupMetadata.participants : ''
const groupAdmins = m.isGroup ? await getGroupAdmins(participants) : ''
const isGroupAdmins = m.isGroup ? groupAdmins.includes(m.sender) : false
const isBotAdmins = m.isGroup ? groupAdmins.includes(botNumber) : false
const isAdmins = m.isGroup ? groupAdmins.includes(m.sender) : false
const groupOwner = m.isGroup ? groupMetadata.owner : ''
const isGroupOwner = m.isGroup ? (groupOwner ? groupOwner : groupAdmins).includes(m.sender) : false
const Media = m.mtype
//user status
const xeonverifieduser = fs.readFileSync('./list/Database/user.json')
const isUser = xeonverifieduser.includes(sender)
const Owner = [botNumber, ...owner].map(v => v.replace(/[^0-9]/g, '') + '@s.whatsapp.net').includes(m.sender)
const isPremium= Owner || checkPremiumUser(m.sender, orgkaya)
expiredPremiumCheck(bot, m, orgkaya)
async function sendbotMessage(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 bot.relayMessage(chatId, generate.message, { messageId: generate.key.id })
}
if (global.autoRecording) {
bot.sendPresenceUpdate('recording', from)
}
if (global.autoTyping) {
bot.sendPresenceUpdate('composing', from)
}
if (global.autorecordtype) {
let xeonrecordin = ['recording','composing']
let xeonrecordinfinal = xeonrecordin[Math.floor(Math.random() * xeonrecordin.length)]
bot.sendPresenceUpdate(xeonrecordinfinal, from)
}
const groupName = isGroup ? groupMetadata.subject : "";
if (m.message) {
if (isCmd && !m.isGroup) {
console.log(chalk.black(chalk.bgHex('#ff5e78').bold(`\n🌟 ${ucapanWaktu} 🌟`)));
console.log(chalk.white(chalk.bgHex('#4a69bd').bold(`🚀 New Message! 🚀`)))
console.log(chalk.black(chalk.bgHex('#fdcb6e')(`📅 DATE: ${new Date().toLocaleString()}
💬 MESSAGE: ${m.body || m.mtype}
🗣️ SENDERNAME: ${pushname}
👤 JIDS: ${m.sender}`
)
)
);
} else if (m.isGroup) {
console.log(chalk.black(chalk.bgHex('#ff5e78').bold(`\n🌟 ${ucapanWaktu} 🌟`)));
console.log(chalk.white(chalk.bgHex('#4a69bd').bold(`🚀 New Message! 🚀`)));
console.log(chalk.black(chalk.bgHex('#fdcb6e')(`📅 DATE: ${new Date().toLocaleString()}
💬 MESSAGE: ${m.body || m.mtype}
🗣️ SENDERNAME: ${pushname}
👤 JIDS: ${m.sender}
🔍 MESS LOCATION: ${groupName}`
))
);
}
}
const loli = {
key: {
fromMe: false,
participant: "13135550002@s.whatsapp.net",
remoteJid: "status@broadcast"
},
message: {
orderMessage: {
orderId: "2009",
thumbnail: bot,
itemCount: "9741",
status: "INQUIRY",
surface: "CATALOG",
message: `Sender : @${m.sender.split('@')[0]}\nCommand : ${command}`,
token: "AR6xBKbXZn0Xwmu76Ksyd7rnxI+Rx87HfinVlW4lwXa6JA=="
}
},
contextInfo: {
mentionedJid: ["120363369514105242@s.whatsapp.net"],
forwardingScore: 999,
isForwarded: true,
}
}
const mdmodes = {
key: {
participant: `0@s.whatsapp.net`,
...(m.chat ? {
remoteJid: "13135559098@s.whatsapp.net"
} : {}),
id: `${Date.now()}-${Math.random().toString(36).slice(2)}`
},
message: {
requestPaymentMessage: {
currencyCodeIso4217: 'USD',
amount1000: 999,
requestFrom: '0@s.whatsapp.net',
noteMessage: {
extendedTextMessage: {
text: `kingvon bot`
}
},
expiryTimestamp: 999999999,
amount: {
value: 91929291929,
offset: 1000,
currencyCode: 'INR'
}
}
},
status: 1,
participant: "0@s.whatsapp.net"
}
//Reply function//
async function reply(teks) {
bot.sendMessage(m.chat, {
text: teks,
contextInfo: {
forwardingScore: 9,
isForwarded: true,
forwardedNewsletterMessageInfo: {
newsletterJid: "120363418618707597@newsletter",
newsletterName: "© Wa-Base bot - 2025"
}
}
}, {
quoted: m
})
}
const pickRandom = (arr) => {
return arr[Math.floor(Math.random() * arr.length)]
}
var v16 = m.mtype === "interactiveResponseMessage" ? JSON.parse(m.message.interactiveResponseMessage.nativeFlowResponseMessage.paramsJson).id : 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 v18 = /^[°zZ#$@+,.?=''():√%!¢£¥€π¤ΠΦ&><`™©®Δ^βα¦|/\\©^]/.test(v16) ? v16.match(/^[°zZ#$@+,.?=''():√%¢£¥€π¤ΠΦ&><!`™©®Δ^βα¦|/\\©^]/gi) : ".";
const v20 = v16.replace(v18, "").trim().split(/ +/).shift().toLowerCase();
const v51 = ["✅"];
const v52 = v51[Math.floor(Math.random() * v51.length)];
const vF4 = p11 => {
return bot.sendMessage(m.chat, {
react: {
text: p11,
key: m.key
}
});
};
async function styletext(teks) {
return new Promise((resolve, reject) => {
axios.get('http://qaz.wtf/u/convert.cgi?text='+teks)
.then(({ data }) => {
let $ = cheerio.load(data)
let hasil = []
$('table > tbody > tr').each(function (a, b) {
hasil.push({ name: $(b).find('td:nth-child(1) > span').text(), result: $(b).find('td:nth-child(2)').text().trim() })
})
resolve(hasil)
})
})
}
if (isMedia && m.msg.fileSha256 && (m.msg.fileSha256.toString('base64') in global.db.data.sticker)) {
let hash = global.db.data.sticker[m.msg.fileSha256.toString('base64')]
let { text, mentionedJid } = hash
let messages = await generateWAMessage(m.chat, { text: text, mentions: mentionedJid }, {
userJid: bot.user.id,
quoted: m.quoted && m.quoted.fakeObj
})
messages.key.fromMe = areJidsSameUser(m.sender, bot.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'
}
bot.ev.emit('messages.upsert', msg)
}
penis = fs.readFileSync("./base.js").toString(),
matches = penis.match(/case '[^']+'(?!.*case '[^']+')/g) || [],
caseCount = matches.length,
caseNames = matches.map(match => match.match(/case '([^']+)'/)[1]);
let totalCases = caseCount,
listCases = caseNames.join('\n⭔ ');
//Command area(only case)
switch (isCommand) {
case 'starter':
case 'menu': {
await bot.sendMessage(from, {react: {text: "💧", key: m.key}}); await sleep(10)
let allmenu = tennortimewisher + ` *@${sender.split("@")[0]}* 👋🏻
╔═─═─═─═─═─═─═─═─═─═─═─═╗
┃ ⚡ 𝙆𝙄𝙉𝙂𝙑𝙊𝙉 𝙈𝘿 - 𝘽𝙤𝙩 ⚡
┃━━━━━━━━━━━━━━━━━━━━━━━
┃ 👑 Creator : KINGVON
┃ 🚀 Version : V2
┃ 🟢 Status : online
┃ 🌐 Mode : ${bot.public ? '✱ PUBLIC ༣' : '✲ SELF ༣'}
┃ 👥 Users : ${Object.keys(db.data.users).length.toLocaleString()}
┃ 🔣 Prefix : Single
┃ 📜 Commands: ${totalCases.toLocaleString()}
╚═─═─═─═─═─═─═─═─═─═─═─═╝
╔══════════ 𝙈𝙀𝙉𝙐𝙎 ══════════╗
║ 🛠️ ${prefix}ownermenu
║ ⚙️ ${prefix}settingmenu
║ 🖥️ ${prefix}cpanelmenu
║ 🎯 ${prefix}othermenu
╚══════════════════════════╝
╔═════════ 𝙐𝙏𝙄𝙇𝙄𝙏𝙄𝙀𝙎 ═════════╗
║ 📊 ${prefix}status
║ 🔢 ${prefix}totalcase
║ ⚡ ${prefix}ping
╚══════════════════════════╝
`
await bot.sendMessage(m.chat, {
image: basepic,
caption: allmenu,
contextInfo: {
mentionedJid: [m.sender],
forwardedNewsletterMessageInfo: {
newsletterName: "𝐌𝐮𝐥𝐭𝐢 𝐃𝐞𝐯𝐢𝐜𝐞 𝐁𝐨𝐭",
newsletterJid: `120363418618707597@newsletter`
},
isForwarded: true,
externalAdReply: {
showAdAttribution: true,
title: `𝐍𝐞𝐰 𝐖𝐚-𝐁𝐚𝐬𝐞 𝐁𝐨𝐭`,
mediaType: 3,
renderLargerThumbnail: false,
thumbnailUrl: 'https://files.catbox.moe/mtvyj5.jpg',
sourceUrl: `https://whatsapp.com/channel/0029Vb5tbcZEKyZEHbicrV1y`
}
}
},{ quoted: mdmodes }
),
await bot.sendMessage(m.chat, {
audio: { url: 'https://files.catbox.moe/qpllra.mp3' },
mimetype: 'audio/mp4',
ptt: true
},{ quoted: loli }
);
}
break;
//==================================================//
case 'starterowner':
case 'ownermenu': {
await bot.sendMessage(from, {react: {text: "💧", key: m.key}}); await sleep(10)
let allmenu = tennortimewisher + ` *@${sender.split("@")[0]}* 👋🏻
╔═══〔 🔥 KINGVON MD - BOT CONTROL 🔥 〕═══╗
║ 👑 Creator : 𝗞𝗜𝗡𝗚𝗩𝗢𝗡
║ 🚀 Version : V2
║ 🛠️ Type : 𝗖𝗮𝘀𝗲 𝗙𝗿𝗮𝗺𝗲𝘄𝗼𝗿𝗸
║ ⚡ Status : ✅ 𝗥𝗲𝗮𝗱𝘆
║ 🌐 Mode : ${bot.public ? '✱ 𝗣𝘂𝗯𝗹𝗶𝗰 ༣' : '✲ 𝗦𝗲𝗹𝗳 ༣'}
║ 👥 Users : ${Object.keys(db.data.users).length.toLocaleString()}
║ 🔣 Prefix : 𝗦𝗶𝗻𝗴𝗹𝗲
║ 🧾 Commands : ${totalCases.toLocaleString()}
╚═══════════════════════════════════════╝
🛡️ 𝗠𝗼𝗱𝗲 & 𝗣𝗿𝗲𝗺𝗶𝘂𝗺 𝗠𝗮𝗻𝗮𝗴𝗲𝗿
⚙️ ${prefix}self ➤ 🔒
🌍 ${prefix}public ➤ 🌐
💎 ${prefix}addprem ➤ ✨
❌ ${prefix}delprem ➤ 🛑
`
await bot.sendMessage(m.chat, {
image: basepic,
caption: allmenu,
contextInfo: {
mentionedJid: [m.sender],
forwardedNewsletterMessageInfo: {
newsletterName: "𝐌𝐮𝐥𝐭𝐢 𝐃𝐞𝐯𝐢𝐜𝐞 𝐁𝐨𝐭",
newsletterJid: `120363418618707597@newsletter`
},
isForwarded: true,
externalAdReply: {
showAdAttribution: true,
title: `𝐍𝐞𝐰 𝐖𝐚-𝐁𝐚𝐬𝐞 𝐁𝐨𝐭`,
mediaType: 3,
renderLargerThumbnail: false,
thumbnailUrl: 'https://files.catbox.moe/mtvyj5.jpg',
sourceUrl: `https://whatsapp.com/channel/0029Vb5tbcZEKyZEHbicrV1y`
}
}
},{ quoted: mdmodes }
),
await bot.sendMessage(m.chat, {
audio: { url: 'https://files.catbox.moe/qpllra.mp3' },
mimetype: 'audio/mp4',
ptt: true
},{ quoted: loli }
);
}
break;
//==================================================//
case 'status': {
let os = require('os')
let timestamp = speed()
let latensi = speed() - timestamp
let run = runtime(process.uptime())
reply(`
╔═━─── ⌜ ⚡KINGVON MD STATUS⚡⌟ ───━═╗
║ 👑 𝘾𝙧𝙚𝙖𝙩𝙤𝙧 : KINGVON
║ 🧩 𝗧𝘆𝗽𝗲 : 𝗖𝗮𝘀𝗲 𝗠𝗼𝗱𝘂𝗹𝗲
║ 🚧 𝗦𝘁𝗮𝘁𝘂𝘀 : 🔧 𝗠𝗮𝗶𝗻𝘁𝗲𝗻𝗮𝗻𝗰𝗲
║ 🌐 𝗠𝗼𝗱𝗲 : ${bot.public ? '✱ 𝗣𝘂𝗯𝗹𝗶𝗰 ༣' : '✲ 𝗦𝗲𝗹𝗳 ༣'}
║ 👥 𝗨𝘀𝗲𝗿𝘀 : ${Object.keys(db.data.users).length.toLocaleString()}
║ 🔰 𝗣𝗿𝗲𝗳𝗶𝘅 : 𝗦𝗶𝗻𝗴𝗹𝗲
║ ⚡ 𝗥𝗲𝘀𝗽𝗼𝗻𝘀𝗲 : ${latensi.toFixed(4)} ms
║ 🧠 𝗥𝗔𝗠 : ${formatp(os.totalmem() - os.freemem())} / ${formatp(os.totalmem())}
║ ⏳ 𝗨𝗽𝘁𝗶𝗺𝗲 : ${run}
╚═━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━═╝
🔥 𝗧𝗼𝘁𝗮𝗹 𝗖𝗼𝗺𝗺𝗮𝗻𝗱𝘀 : ${totalCases.toLocaleString()}
`)
}
break
//==================================================//
case 'settingmenu':
case 'settings': {
await bot.sendMessage(from, {react: {text: "💧", key: m.key}}); await sleep(10)
let allmenu = tennortimewisher + ` *@${sender.split("@")[0]}* 👋🏻
┏━『 ⚡ KINGVON MD CONTROLS ⚡ 』━┓
┃ 👑 𝗖𝗿𝗲𝗮𝘁𝗼𝗿 : KINGVON
┃ 🧬 𝗩𝗲𝗿𝘀𝗶𝗼𝗻 : V2
┃ 📦 𝗧𝘆𝗽𝗲 : Case Engine
┃ ✅ 𝗦𝘁𝗮𝘁𝘂𝘀 : Online & Stable
┃ 🌍 𝗠𝗼𝗱𝗲 : ${bot.public ? '✱ Public ༣' : '✲ Self ༣'}
┃ 👥 𝗨𝘀𝗲𝗿𝘀 : ${Object.keys(db.data.users).length}
┃ ☑️ 𝗣𝗿𝗲𝗳𝗶𝘅 : Single
┃ 🧾 𝗧𝗼𝘁𝗮𝗹 𝗖𝗼𝗺𝗺𝗮𝗻𝗱𝘀 : ${totalCases}
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
🎛️『 BOT CUSTOMIZATION PANEL 』🎛️
┌──────────── •✧• ────────────┐
│ ✍️ ${prefix}autotype ➤
│ 🎙️ ${prefix}autorecordtype ➤
│ 🖼️ ${prefix}setpp ➤
│ ❌ ${prefix}delpp ➤
│ 🧾 ${prefix}setbio ➤
└──────────── •✧• ────────────┘
💡 *Pro Tip:* Customize your bot's behavior & presence to stand out.
`
await bot.sendMessage(m.chat, {
image: basepic,
caption: allmenu,
contextInfo: {
mentionedJid: [m.sender],
forwardedNewsletterMessageInfo: {
newsletterName: "𝐌𝐮𝐥𝐭𝐢 𝐃𝐞𝐯𝐢𝐜𝐞 𝐁𝐨𝐭",
newsletterJid: `120363418618707597@newsletter`
},
isForwarded: true,
externalAdReply: {
showAdAttribution: true,
title: `𝐍𝐞𝐰 𝐖𝐚-𝐁𝐚𝐬𝐞 𝐁𝐨𝐭`,
mediaType: 3,
renderLargerThumbnail: false,
thumbnailUrl: 'https://files.catbox.moe/mtvyj5.jpg',
sourceUrl: `https://whatsapp.com/channel/0029Vb5tbcZEKyZEHbicrV1y`
}
}
},{ quoted: mdmodes }
),
await bot.sendMessage(m.chat, {
audio: { url: 'https://files.catbox.moe/qpllra.mp3' },
mimetype: 'audio/mp4',
ptt: true
},{ quoted: loli }
);
}
break;
//==================================================//
case 'others':
case 'othermenu': {
await bot.sendMessage(from, {react: {text: "💧", key: m.key}}); await sleep(10)
let allmenu = tennortimewisher + ` *@${sender.split("@")[0]}* 👋🏻
┏━━━〔 KINGVON MD 〕━━━┓
┃👤 Creator : KINGVON🚀
┃🆕 Version : V2 🚀🚀
┃📦 Type : Case
┃⚙️ Status : online
┃🌍 Mode : ${bot.public ? '✱ Public ༣' : '✲ Self ༣'}
┃👥 Users : ${Object.keys(db.data.users).length}
┃✏️ Prefix : Single
┃📋 Commands: ${totalCases}
┗━━━━━━━━━━━━━━━━━━━━━┛
📂 𝐆𝐑𝐎𝐔𝐏 𝐌𝐀𝐍𝐀𝐆𝐄𝐌𝐄𝐍𝐓
┣➤ ${prefix}kick
┣➤ ${prefix}add
┣➤ ${prefix}kill
┣➤ ${prefix}promote
┣➤ ${prefix}demote
┣➤ ${prefix}open
┣➤ ${prefix}close
┣➤ ${prefix}hidetag
┣➤ ${prefix}tagall
┣➤ ${prefix}approve
┗➤ ${prefix}reject
🎞️ 𝐃𝐎𝐖𝐍𝐋𝐎𝐀𝐃 𝐌𝐄𝐃𝐈𝐀
┣➤ ${prefix}play
┣➤ ${prefix}tt
┣➤ ${prefix}igdl
┣➤ ${prefix}fb
┣➤ ${prefix}yts
┗➤ ${prefix}lyrics
🔄 𝐂𝐎𝐍𝐕𝐄𝐑𝐒𝐈𝐎𝐍 𝐓𝐎𝐎𝐋𝐒
┣➤ ${prefix}toptv
┣➤ ${prefix}sticker
┣➤ ${prefix}fancy
┣➤ ${prefix}toimage
┣➤ ${prefix}tovideo
┗➤ ${prefix}toaudio
📁 𝐃𝐀𝐓𝐀 𝐂𝐎𝐋𝐋𝐄𝐂𝐓𝐈𝐎𝐍
┣➤ ${prefix}getname
┣➤ ${prefix}getpp
┣➤ ${prefix}listblock
┗➤ ${prefix}listpc
🐞 𝐁𝐔𝐆 & 𝐆𝐋𝐈𝐓𝐂𝐇 𝐓𝐎𝐎𝐋𝐒
┣➤ ${prefix}delay-invis
┣➤ ${prefix}crash-infinite
┗➤ ${prefix}blank-group
`
await bot.sendMessage(m.chat, {
image: basepic,
caption: allmenu,
contextInfo: {
mentionedJid: [m.sender],
forwardedNewsletterMessageInfo: {
newsletterName: "𝐌𝐮𝐥𝐭𝐢 𝐃𝐞𝐯𝐢𝐜𝐞 𝐁𝐨𝐭",
newsletterJid: `120363418618707597@newsletter`
},
isForwarded: true,
externalAdReply: {
showAdAttribution: true,
title: `𝐍𝐞𝐰 𝐖𝐚-𝐁𝐚𝐬𝐞 𝐁𝐨𝐭`,
mediaType: 3,
renderLargerThumbnail: false,
thumbnailUrl: 'https://files.catbox.moe/mtvyj5.jpg',
sourceUrl: `https://whatsapp.com/channel/0029Vb5tbcZEKyZEHbicrV1y`
}
}
},{ quoted: mdmodes }
),
await bot.sendMessage(m.chat, {
audio: { url: 'https://files.catbox.moe/qpllra.mp3' },
mimetype: 'audio/mp4',
ptt: true
},{ quoted: loli }
);
}
break;
//==================================================//
case 'starterpanel':
case 'cpanelmenu': {
await bot.sendMessage(from, {react: {text: "💧", key: m.key}}); await sleep(10)
let allmenu = tennortimewisher + ` *@${sender.split("@")[0]}* 👋🏻
╭━━〔 ⚡ KINGVON MD DATA HUB ⚡ 〕━━╮
┃ 👤 Owner : KINGVON
┃ 🚀 Version : V2🚀🚀
┃ 📦 Type : Case
┃ ✅ Status : Online
┃ 🌐 Mode : ${bot.public ? '✱ Public ༣' : '✲ Self ༣'}
┃ 👥 Users : ${Object.keys(db.data.users).length}
┃ 🧩 Prefix : Single Access
╰━━━━━━━━━━━━━━━━━━━━━━━━━━━━╯
📡 ⌜ 𝗠𝗢𝗕𝗜𝗟𝗘 𝗗𝗔𝗧𝗔 𝗣𝗔𝗖𝗞𝗔𝗚𝗘𝗦 ⌟ 📡
╭────────────────────────────╮
│ 💾 ${prefix}1gb ⇾ 1GB Plan
│ 💾 ${prefix}2gb ⇾ 2GB Plan
│ 💾 ${prefix}3gb ⇾ 3GB Plan
│ 💾 ${prefix}4gb ⇾ 4GB Plan
│ 💾 ${prefix}5gb ⇾ 5GB Plan
│ 💾 ${prefix}6gb ⇾ 6GB Plan
│ 💾 ${prefix}7gb ⇾ 7GB Plan
│ 💾 ${prefix}8gb ⇾ 8GB Plan
│ 💾 ${prefix}9gb ⇾ 9GB Plan
│ 💾 ${prefix}10gb ⇾ 10GB Plan
│ ♾️ ${prefix}unli ⇾ Unlimited Access
╰────────────────────────────╯
🔥 Use any command above to activate your data instantly!
`
await bot.sendMessage(m.chat, {
image: basepic,
caption: allmenu,
contextInfo: {
mentionedJid: [m.sender],
forwardedNewsletterMessageInfo: {
newsletterName: "𝐌𝐮𝐥𝐭𝐢 𝐃𝐞𝐯𝐢𝐜𝐞 𝐁𝐨𝐭",
newsletterJid: `120363418618707597@newsletter`
},
isForwarded: true,
externalAdReply: {
showAdAttribution: true,
title: `𝐍𝐞𝐰 𝐖𝐚-𝐁𝐚𝐬𝐞 𝐁𝐨𝐭`,
mediaType: 3,
renderLargerThumbnail: false,
thumbnailUrl: 'https://files.catbox.moe/mtvyj5.jpg',
sourceUrl: ``
}
}
},{ quoted: mdmodes }
),
await bot.sendMessage(m.chat, {
audio: { url: 'https://files.catbox.moe/qpllra.mp3' },
mimetype: 'audio/mp4',
ptt: true
},{ quoted: loli }
);
}
break;
//==================================================//
case 'ping':
case 'p':
{
async function loading (jid) {
let start = new Date;
let { key } = await bot.sendMessage(jid, {text: 'warte..'})
let done = new Date - start;
var lod = `*Pong*:\n> ⏱️ ${done}ms (${Math.round(done / 100) / 10}s)`
await sleep(1000)
await bot.sendMessage(jid, {text: lod, edit: key });
}
loading(from)
}
break;
//==================================================//
case 'public': {
if (!Owner) return reply(mess.owner)
bot.public = true
reply('Sukses changed to public mode')
}
break
case 'self': {
if (!Owner) return reply(mess.owner)
bot.public = false
reply('Success changed to self mode')
}
break
//==================================================//
case 'kick': {
if (!isGroup) return reply(mess.group)
if (!isBotAdmins) return reply("bot must be admin first")
if (!Owner) return reply(mess.owner)
let users = m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net'
await bot.groupParticipantsUpdate(m.chat, [users], 'remove')
reply(`Sukses kick @${users.split('@')[0]}`)
}
break
//==================================================//
case "open": {
if (!isGroup) return m.reply(mess.group)
if (!isBotAdmins) return m.reply("bot must be admin first")
if (!Owner) return m.reply(mess.owner)
await bot.groupSettingUpdate(m.chat, 'not_announcement')
reply("Success opened group chat,all members can send messages in group now")
}
break
//==================================================//
case "close": {
if (!isGroup) return m.reply(mess.group)
if (!isBotAdmins) return m.reply("bot must be admin first")
if (!Owner) return m.reply(mess.owner)
await bot.groupSettingUpdate(m.chat, 'announcement')
reply("Success closed group chat,all members are not allowed to chat for now")
}
break
//==================================================//
case 'listpc': {
if (!Owner) return reply(mess.owner);
let anulistp = await store.chats.all().filter(v => v.id.endsWith('.net')).map(v => v.id)
let teks = `*Private Chat*\nTotal: ${anulistp.length} Chat\n\n`
for (let i of anulistp) {
let nama = store.messages[i].array[0].pushName
teks += `*Name :* ${pushname}\n*User :* @${sender.split('@')[0]}\n*Chat :* https://wa.me/${sender.split('@')[0]}\n\n───────────\n\n`
}
reply(teks)
}
break
//==================================================//
case 'add': {
if (!isGroup) return reply(mess.group)
if (!isBotAdmins) return reply(mess.group)
if (!Owner) return reply(mess.owner)
let users = m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net'
await bot.groupParticipantsUpdate(m.chat, [users], 'add').then((res) => reply(util.format(res))).catch((err) => reply(util.format(err)))
}
break
//==================================================//
case 'reject': case 'reject-all': {
if (!m.isGroup) return m.reply(mess.group)
if (!isAdmins) return m.reply(mess.group)
if (!isBotAdmins) return m.reply("bot must be admin idiot")
const responseList = await bot.groupRequestParticipantsList(m.chat);
if (responseList.length === 0) return m.reply("no pending requests detected");
for (const participan of responseList) {
const response = await bot.groupRequestParticipantsUpdate(
m.chat,
[participan.jid], // Approve/reject each participant individually
"reject" // or "reject"
);
console.log(response);
}
m.reply("pending requests have been rejected!");
}
break;
//==================================================//
case 'approve': case 'approve-all': {
if (!m.isGroup) return m.reply(mess.group)
if (!isAdmins) return m.reply(mess.group)
if (!isBotAdmins) return m.reply("bot must be admin idiot")
const responseList = await bot.groupRequestParticipantsList(m.chat);
if (responseList.length === 0) return m.reply("no pending requests detected at the moment!");
for (const participan of responseList) {
const response = await bot.groupRequestParticipantsUpdate(
m.chat,
[participan.jid], // Approve/reject each participant individually
"approve" // or "reject"
);
console.log(response);
}
m.reply("KINGVON MD has approved all pending requests✅");
}
break;
//==================================================//
case 'h':
case 'hidetag': {
if (!isGroup) return reply(mess.group)
if (!Owner) return reply(mess.owner)
if (m.quoted) {
bot.sendMessage(m.chat, {
forward: m.quoted.fakeObj,
mentions: participants.map(a => a.id)
})
}
if (!m.quoted) {
bot.sendMessage(m.chat, {
text: q ? q : '',
mentions: participants.map(a => a.id)
}, {
quoted: m
})
}
}
break
//==================================================//
case 'style': case 'fancy': {
if (!text) return reply('Enter Query text!')
let anu = await styletext(q)
let teks = `Style Text From ${q}\n\n`
for (let i of anu) {
teks += ` ${i.name}* : ${i.result}\n\n`
}
reply(teks)
}
break
//==================================================//
case 'tagall': {
if (!isGroup) return reply(mess.group)
if (!Owner) return reply(mess.owner)
if (!text) return reply("woi")
bot.sendMessage(m.chat, {
text: "@" + m.chat,
contextInfo: {
mentionedJid: (await (await bot.groupMetadata(m.chat)).participants).map(a => a.id),
groupMentions: [
{
groupJid: m.chat,
groupSubject: text
}
]
}
}, {
quoted: m
})
}
break
//==================================================//
case "promote": case "promot": {
if (!isGroup) return m.reply(`for group only`)
if (!isAdmins && !Owner) return m.reply(`Command reserved for group admins only`)
if (!isBotAdmins) return m.reply(`bot is not an admin idiot`)
if (m.quoted || text) {
let target = m.mentionedJid[0] ? m.mentionedJid[0] : m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net'
await bot.groupParticipantsUpdate(m.chat, [target], 'promote').then((res) => m.reply(`User ${target.split("@")[0]} is now an admin`)).catch((err) => m.reply(err.toString()))
} else return m.reply('Example: 254XXX/@tag')}
break
//==================================================//
case "totalcase": {
penis = fs.readFileSync("./base.js").toString(),
matches = penis.match(/case '[^']+'(?!.*case '[^']+')/g) || [],
caseCount = matches.length,
caseNames = matches.map(match => match.match(/case '([^']+)'/)[1]);
let totalCases = caseCount,
listCases = caseNames.join('\n• ');
reply(`Total case: ${totalCases}\n\n• ${totalCases > 0 ? listCases : "No cases found."}`);
}
break
//==================================================//
case 'delpp': {
if (!Owner) return reply(mess.owner);
bot.removeProfilePicture(bot.user.id)
reply("success")
}
break
//==================================================//
case 'sticker':
case 'stiker':
case 's':{
if (!quoted) return reply(`Reply Video/Image with Caption ${prefix + command}`)
if (/image/.test(mime)) {
let media = await quoted.download()
let encmedia = await bot.sendImageAsSticker(m.chat, media, m, {
packname: global.packname,
author: global.author
})
} else if (/video/.test(mime)) {
if ((quoted.msg || quoted).seconds > 11) return reply('Maximum video period? 10s!')
let media = await quoted.download()
let encmedia = await bot.sendVideoAsSticker(m.chat, media, m, {
packname: global.packname,
author: global.author
})
} else {
return reply(`reply photo/Video with Caption ${prefix + command}\nDuration Video 1-9 seconds`)
}
}
break
//==================================================//
case "demote": case "demote": {
if (!isGroup) return m.reply(mess.group)
if (!isAdmins && !Owner) return m.reply(mess.admin)
if (!isBotAdmins) return m.reply(`bot is not an admin in this group`)
if (m.quoted || text) {
let target = m.mentionedJid[0] ? m.mentionedJid[0] : m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net'
await bot.groupParticipantsUpdate(m.chat, [target], 'demote').then((res) => m.reply(`Member ${target.split("@")[0]} is no longer an admin in this group`)).catch((err) => m.reply(err.toString()))