-
Notifications
You must be signed in to change notification settings - Fork 339
Expand file tree
/
Copy pathTkm.js
More file actions
2780 lines (2545 loc) ยท 106 KB
/
Tkm.js
File metadata and controls
2780 lines (2545 loc) ยท 106 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
/*
โโโโโ โโโโ โโโโโ โโโโ โโโโโ โโโโโ
โโโโโ โโโโ โโโโโ โโโโ โโโโโ โโโโโ
โโโโโ โโโโ โโโโโ โโโโ โโโโโ โโโโโ
ยฉ TKM-mods
WhatsApp Me : 263775571820
- Source โ
- t.me/TKM-mods
- wa.me/263775571820
- https://whatsapp.com/channel/0029Vb5lvXDCMY0EyIW8Yf19
*/
const { Sticker } = require('wa-sticker-formatter')
module.exports = async (Tkm, m, store) => {
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 === 'interactiveResponseMessage') ? JSON.parse(m.message.interactiveResponseMessage.nativeFlowResponseMessage.paramsJson).id : (m.mtype == 'templateButtonReplyMessage') ? m.message.templateButtonReplyMessage.selectedId : (m.mtype === 'messageContextInfo') ? (m.message.buttonsResponseMessage?.selectedButtonId || m.message.listResponseMessage?.singleSelectReply.selectedRowId || m.text) : ''
//========== DATABASE ===========//
const antilink = JSON.parse(fs.readFileSync('./all/database/antilink.json'))
const antilink2 = JSON.parse(fs.readFileSync('./all/database/antilink2.json'))
const contacts = JSON.parse(fs.readFileSync("./all/database/contacts.json"))
const premium = JSON.parse(fs.readFileSync("./all/database/premium.json"))
const owner2 = JSON.parse(fs.readFileSync("./all/database/owner.json"))
const teksjpm = fs.readFileSync("./list/teksjpm.js").toString()
const isPremium = premium.includes(m.sender)
//========= CONFIGURASI ==========//
const budy = (typeof m.text == 'string' ? m.text : '')
const isOwner = owner2.includes(m.sender) ? true : m.sender == owner+"@s.whatsapp.net" ? true : m.fromMe ? true : false
const prefix = /^[ยฐzZ#$@+,.?=''():โ%!ยขยฃยฅโฌฯยคฮ ฮฆ&><โขยฉยฎฮ^ฮฒฮฑยฆ|/\\ยฉ^]/.test(body) ? body.match(/^[ยฐzZ#$@+,.?=''():โ%ยขยฃยฅโฌฯยคฮ ฮฆ&><!โขยฉยฎฮ^ฮฒฮฑยฆ|/\\ยฉ^]/gi) : isOwner && !m.isBaileys ? '' : '.'
const isCmd = body.startsWith(prefix)
const command = isCmd ? body.slice(prefix.length).trim().split(' ').shift().toLowerCase() : ""
const cmd = prefix + command
const args = body.trim().split(/ +/).slice(1)
var crypto = require("crypto")
const JsConfuser = require('js-confuser');
const jsobfus = require('javascript-obfuscator');
const yts = require('yt-search');
const ytdl = require('ytdl-core');
const moment = require('moment-timezone');
const time = moment().format("HH:mm:ss DD/MM");
let { randomBytes } = require("crypto")
const makeid = randomBytes(3).toString('hex')
const quoted = m.quoted ? m.quoted : m
const mime = (quoted.msg || quoted).mimetype || ''
const qmsg = (quoted.msg || quoted)
const text = q = args.join(" ")
const botNumber = await Tkm.decodeJid(Tkm.user.id)
const isGroup = m.chat.endsWith('@g.us')
const senderNumber = m.sender.split('@')[0]
const pushname = m.pushName || `${senderNumber}`
const isBot = botNumber.includes(senderNumber)
const groupMetadata = isGroup ? await Tkm.groupMetadata(m.chat) : {}
let participant_bot = isGroup ? groupMetadata.participants.find((v) => v.id == botNumber) : {}
const groupName = isGroup ? groupMetadata.subject : "";
let participant_sender = isGroup ? groupMetadata.participants.find((v) => v.id == m.sender) : {}
const isBotAdmin = participant_bot?.admin !== null ? true : false
const isAdmin = participant_sender?.admin !== null ? true : false
const { runtime, getRandom, getTime, tanggal, toRupiah, telegraPh, pinterest, ucapan, generateProfilePicture, getBuffer, fetchJson } = require('./all/function.js')
const { sleep } = require("./all/myfunc.js")
const { toAudio, toPTT, toVideo, ffmpeg } = require("./all/converter.js")
//=========== MESSAGE ===========//
if (isCmd) {
console.log(chalk.green.bold("ใ ") +
chalk.magenta.bold("Console By TKM-mods") +
chalk.green.bold(" ใ ") +
chalk.blue(time) +
" from " +
chalk.magenta.bold(pushname) +
" in " +
chalk.yellow.bold(groupName))
};
// Get Total cmds
let totalcmds = () => {
var mytext = fs.readFileSync("./Tkm.js").toString();
var numUpper = (mytext.match(/case ['"]/g) || []).length;
return numUpper;
};
//obfusvate
async function obfus(query) {
return new Promise((resolve, reject) => {
try {
const obfuscationResult = jsobfus.obfuscate(query,
{
compact: false,
controlFlowFlattening: true,
controlFlowFlatteningThreshold: 1,
numbersToExpressions: true,
simplify: true,
stringArrayShuffle: true,
splitStrings: true,
stringArrayThreshold: 1
}
)
const result = {
status: 200,
author: `TKM-mods`,
result: obfuscationResult.getObfuscatedCode()
}
resolve(result)
} catch (e) {
reject(e)
}
})
}
//reply
const xy = {
key: {
fromMe: false,
participant: "0@s.whatsapp.net",
remoteJid: "status@broadcast"
},
message: {
orderMessage: {
itemCount: 99999,
status: 200,
thumbnailUrl: 'https://files.catbox.moe/5bzcdl.jpg',
surface: 200,
message: `ยฉ TKM`,
orderTitle: '@ciro',
sellerJid: '0@s.whatsapp.net'
}
},
contextInfo: {
forwardingScore: 999,
isForwarded: true
},
sendEphemeral: true
};
//My reply function
async function ReplyTkm(teks) {
const nedd = {
contextInfo: {
forwardingScore: 1,
isForwarded: true,
forwardedNewsletterMessageInfo: {
newsletterName: `TKM bot`,
newsletterJid: `120363145886073504@g.us`,
},
externalAdReply: {
showAdAttribution: true,
title: `ยฉ Lord TKM`,
body: `๐๐๐๐๐๐๐๐ ๐๐๐ ๐ฒ๐๐๐๐๐๐ ๐๐ข ๐๐๐๐๐๐ฃ๐ ๐ ๐ผ๐๐๐๐๐`,
previewType: "IMAGE",
thumbnailUrl: 'https://files.catbox.moe/5bzcdl.jpg',
sourceUrl: global.yt,
},
},
text: teks,
};
return Tkm.sendMessage(m.chat, nedd, {
quoted: xy,
});
}
//========== CASE ===========//
async function dellCase(filePath, caseNameToRemove) {
fs.readFile(filePath, 'utf8', (err, data) => {
if (err) {
console.error('Terjadi kesalahan:', err);
return;
}
const regex = new RegExp(`case\\s+'${caseNameToRemove}':[\\s\\S]*?break`, 'g');
const modifiedData = data.replace(regex, '');
fs.writeFile(filePath, modifiedData, 'utf8', (err) => {
if (err) {
console.error('Terjadi kesalahan saat menulis file:', err);
return;
}
console.log(`Teks dari case '${caseNameToRemove}' telah dihapus dari file.`);
});
});
}
//========== FUNCTION ===========//
let ppuser
try {
ppuser = await Tkm.profilePictureUrl(m.sender, 'image')
} catch (err) {
ppuser = 'https://files.catbox.moe/5bzcdl.jpg'
}
async function SendSlide(jid, img, txt = []) {
let anu = new Array()
let imgsc = await prepareWAMessageMedia({ image: img}, { upload: Tkm.waUploadToServer })
for (let ii of txt) {
anu.push({
body: proto.Message.InteractiveMessage.Body.fromObject({
text: `${ii}`
}),
header: proto.Message.InteractiveMessage.Header.fromObject({
hasMediaAttachment: true,
...imgsc
}),
nativeFlowMessage: proto.Message.InteractiveMessage.NativeFlowMessage.fromObject({
buttons: [{
name: "cta_url",
buttonParamsJson: `{\"display_text\":\"๐ฅBeli Produk๐ฅ\",\"url\":\"https://wa.me/${global.owner}\",\"merchant_url\":\"https://www.google.com\"}`
},
{
name: "cta_url",
buttonParamsJson: `{\"display_text\":\"Testimoni\",\"url\":\"${global.linksaluran}\",\"merchant_url\":\"https://www.google.com\"}`
},
{
name: "cta_url",
buttonParamsJson: `{\"display_text\":\"Join Grup\",\"url\":\"${global.linkgc}\",\"merchant_url\":\"https://www.google.com\"}`
}]
})
})}
const msgii = await generateWAMessageFromContent(m.chat, {
viewOnceMessage: {
message: {
messageContextInfo: {
deviceListMetadata: {},
deviceListMetadataVersion: 2
}, interactiveMessage: proto.Message.InteractiveMessage.fromObject({
body: proto.Message.InteractiveMessage.Body.fromObject({
text: "*All TRX Open โ
*\n\n*FALL STORE* *Menyediakan Produk & Jasa Dibawah Ini*"
}),
carouselMessage: proto.Message.InteractiveMessage.CarouselMessage.fromObject({
cards: anu
})
})}
}}, {userJid: m.sender, quoted: qtoko})
return Tkm.relayMessage(jid, msgii.message, {
messageId: msgii.key.id
})}
let example = (teks) => {
return `\n*Example Usage :*\nType *${cmd}* ${teks}\n`
}
var resize = async (image, width, height) => {
let oyy = await Jimp.read(image)
let kiyomasa = await oyy.resize(width, height).getBufferAsync(Jimp.MIME_JPEG)
return kiyomasa
}
function capital(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
const createSerial = (size) => {
return crypto.randomBytes(size).toString('hex').slice(0, size)
}
//========= SETTING EVENT ========//
if (global.owneroff && !isCmd) {
if (!isGroup && !isOwner) {
let teks = `*Hai Kak* @${m.sender.split('@')[0]}
Maaf *Ownerku Sedang Offline*, Silahkan Tunggu Owner Kembali Online & Jangan Spam Chat`
return Tkm.sendMessage(m.chat, {text: `${teks}`, contextInfo: {mentionedJid: [m.sender], externalAdReply: {
showAdAttribution: true, thumbnail: fs.readFileSync("./media/ownermode.jpg"), renderLargerThumbnail: false, title: "๏ฝข OWNER OFFLINE MODE ๏ฝฃ", mediaUrl: linkgc, sourceUrl: linkyt, previewType: "PHOTO"}}}, {quoted: null})
}}
/*if (global.antibug) {
if (!isGroup && m.isBaileys && !m.fromMe) {
await Tkm.sendMessage(m.chat, {
delete: {
remoteJid: m.chat, fromMe: true, id: m.key.id
}})
await Tkm.sendMessage(`${global.owner}@s.whatsapp.net`, {text: `*Terdeteksi Pesan Bug*
*Nomor :* ${m.sender.split("@")[0]}`}, {quoted: null})
}}*/
if (antilink.includes(m.chat)) {
if (!isBotAdmin) return
if (!isAdmin && !isOwner && !m.fromMe) {
var link = /chat.whatsapp.com|buka tautaniniuntukbergabungkegrupwhatsapp/gi
if (link.test(m.text)) {
var gclink = (`https://chat.whatsapp.com/` + await Tkm.groupInviteCode(m.chat))
var isLinkThisGc = new RegExp(gclink, 'i')
var isgclink = isLinkThisGc.test(m.text)
if (isgclink) return
let delet = m.key.participant
let bang = m.key.id
await Tkm.sendMessage(m.chat, {text: `@${m.sender.split("@")[0]} Maaf Kamu Akan Saya Keluarkan Dari In Group Karna Admin/Owner Bot Menyalakan Fitur *Antilink* Grup Lain!`, contextInfo: {mentionedJid: [m.sender], externalAdReply: {thumbnail: fs.readFileSync("./media/warning.jpg"), title: "๏ฝข LINK GRUP DETECTED ๏ฝฃ", previewType: "PHOTO"}}}, {quoted: m})
await Tkm.sendMessage(m.chat, { delete: { remoteJid: m.chat, fromMe: false, id: bang, participant: delet }})
await Tkm.groupParticipantsUpdate(m.chat, [m.sender], "remove")
}
}}
if (antilink2.includes(m.chat)) {
if (!isBotAdmin) return
if (!isAdmin && !isOwner && !m.fromMe) {
var link = /chat.whatsapp.com|buka tautaniniuntukbergabungkegrupwhatsapp/gi
if (link.test(m.text)) {
var gclink = (`https://chat.whatsapp.com/` + await Tkm.groupInviteCode(m.chat))
var isLinkThisGc = new RegExp(gclink, 'i')
var isgclink = isLinkThisGc.test(m.text)
if (isgclink) return
let delet = m.key.participant
let bang = m.key.id
await Tkm.sendMessage(m.chat, {text: `@${m.sender.split("@")[0]} Maaf Pesan Kamu Saya Hapus Karna Admin/Owner Bot Menyalakan Fitur *Antilink* Grup Lain!`, contextInfo: {mentionedJid: [m.sender], externalAdReply: {thumbnail: fs.readFileSync("./media/warning.jpg"), title: "๏ฝข LINK GRUP DETECTED ๏ฝฃ", previewType: "PHOTO"}}}, {quoted: m})
await Tkm.sendMessage(m.chat, { delete: { remoteJid: m.chat, fromMe: false, id: bang, participant: delet }})
}
}}
switch (command) {
case "menu": case "p": case "pp": case "bokep": {
let teksmenu = `
โญโโข
โ \`๐๐บ๐ผ-๐๐๐\`
โฐโโข
โญโโข
โ โน *Botname :* ${global.namabot2}
โ โน *Total CMDs :* ${totalcmds()}
โ โน *Mode :* ${Tkm.public ? "Public": "Self"}
โ โน *Creator :* @${global.owner}
โ โน *Runtime Bot :* ${runtime(process.uptime())}
โ โน *Uptime Vps :* ${runtime(os.uptime())}
โฐโโข
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โญโโข *GENERAL CMDs*
โ โฆ .owner
โ โฆ .reportbug
โ โฆ .request
โ โฆ .menu
โ โฆ .dp <reply-message>
โฐโโข
โญโโข *SEARCH CMDs*
โ โฆ .google <text>
โ โฆ .define <word>
โ โฆ .lyrics <song-name>
โ โฆ .imdb <movie-name>
โ โฆ .wikipedia <text>
โ โฆ .yts <text>
โฐโโข
โญโโข *DOWNLOAD CMDs*
โ โฆ .play <song-name>
โ โฆ .song <song-name>
โ โฆ .video <video-name>
โ โฆ .img <text>
โฐโโข
โญโโข *AI CMDs*
โ โฆ .llama <text>
โ โฆ .darktkm <text>
โ โฆ .tkm <text>
โ โฆ .gpt <text>
โ โฆ .ai <text>
โ โฆ .openai <text>
โ โฆ .deepseek <text>
โ โฆ .deepimg <text>
โฐโโข
โญโโข *MISC CMDs*
โ โฆ .gitclone <repo-link>
โ โฆ .weather <city/town>
โ โฆ .githubstalk <username>
โ โฆ .trt <text>
โ โฆ .tts <text>
โ โฆ .enc <code>
โฐโโข
โญโโข *GC CMDs*
โ โฆ .hidetag <text>
โ โฆ .tagall <text>
โ โฆ .antilink
โ โฆ .antilinkv2
โ โฆ .addmember
โ โฆ .kick
โ โฆ .delete
โ โฆ .setgcname
โ โฆ .open/close
โ โฆ .setppgc
โ โฆ .promote
โ โฆ .demote
โ โฆ .welcome
โ โฆ .inspect <getidgc>
โ โฆ .killgc
โฐโโข
โญโโข *OWNER CMDs*
โ โฆ .addowner
โ โฆ .delowner
โ โฆ .addpremium
โ โฆ .delpremium
โ โฆ .setppbot
โ โฆ .setppbotlong
โ โฆ .autoread
โ โฆ .autoreadsw
โ โฆ .setbotname
โ โฆ .getcase
โ โฆ .listowner
โ โฆ .listpremium
โ โฆ .setbiobot
โ โฆ .joingc
โ โฆ .block
โ โฆ .unblock
โ โฆ .setting
โ โฆ .pushcontact
โ โฆ .listgc
โฐโโข
โญโโข *MAKER CMDs*
โ โฆ .child <text>
โ โฆ .metallic <text>
โ โฆ .ice <text>
โ โฆ .snow <text>
โ โฆ .impressive <text>
โ โฆ .noel <text>
โ โฆ .water <text>
โ โฆ .matrix <text>
โ โฆ .light <text>
โ โฆ .neon <text>
โ โฆ .silver <text>
โ โฆ .devil <text>
โ โฆ .gold <text>
โ โฆ .cat <text>
โ โฆ .graffiti <text>
โ โฆ .naruto <text>
โ โฆ .dragonball <text>
โ โฆ .sand <text>
โ โฆ .hacker <text>
โ โฆ .arena <text>
โ โฆ .1917 <text>
โ โฆ .leaves <text>
โ โฆ .thunder <text>
โ โฆ .purple <text>
โ โฆ .typography <text>
โฐโโข
โญโโข *CMDs to be fixed*
โ โฆ .play
โ โฆ .video
โฐโโข
โญโโข
โ ใ *ยฉ TKM-mods* ใ
โฐโโข
`
Tkm.sendMessage(m.chat, {
text: teksmenu,
contextInfo: {
externalAdReply: {
showAdAttribution: true,
title: '๐๐บ๐ผ-๐๐๐',
body: `๐๐๐๐๐๐๐๐ ๐๐๐ ๐ฒ๐๐๐๐๐๐ ๐๐ข ๐๐๐๐๐๐ฃ๐ ๐ ๐ผ๐๐๐๐๐`,
thumbnailUrl: 'https://files.catbox.moe/5bzcdl.jpg',
sourceUrl: global.linksaluran,
mediaType: 1,
renderLargerThumbnail: true
}
}
}, {
quoted: m
})
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
break
case "owner": case "sc": case "script": case "repo": {
let teksmenu = `
โญโโข
โ \`๐๐บ๐ผ-๐๐๐\`
โฐโโข
โญโโข *OWNER INFO*
โ โฆ *Telegram*: https://t.me/tkm_mods
โ โฆ *GitHub*: https://github.com/Cod3Uchiha
โ โฆ *YouTube*: https://youtube.com/@TKM-mods
โฐโโข
โญโโข
โ ใ *ยฉ TKM-mods* ใ
โฐโโข
`
Tkm.sendMessage(m.chat, {
text: teksmenu,
contextInfo: {
externalAdReply: {
showAdAttribution: true,
title: '๐๐บ๐ผ-๐๐๐',
body: `๐๐๐๐๐๐๐๐ ๐๐๐ ๐ฒ๐๐๐๐๐๐ ๐๐ข ๐๐๐๐๐๐ฃ๐ ๐ ๐ผ๐๐๐๐๐`,
thumbnailUrl: 'https://files.catbox.moe/5bzcdl.jpg',
sourceUrl: global.linksaluran,
mediaType: 1,
renderLargerThumbnail: true
}
}
}, {
quoted: m
})
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
break
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
case "credits": case "thanks": case "thanksto": case "credit": {
let teksmenu = `
โญโโข
โ \`๐๐บ๐ผ-๐๐๐\`
โฐโโข
โญโโข *OWNER and DEVELOPER*
โ โฆ *Telegram*: https://t.me/tkm_mods
โ โฆ *GitHub*: https://github.com/Cod3Uchiha
โ โฆ *YouTube*: https://youtube.com/@TKM-mods
โฐโโข
> Base created by FALLXD
โญโโข
โ ใ *ยฉ TKM-mods* ใ
โฐโโข
`
Tkm.sendMessage(m.chat, {
text: teksmenu,
contextInfo: {
externalAdReply: {
showAdAttribution: true,
title: '๐๐บ๐ผ-๐๐๐',
body: `๐๐๐๐๐๐๐๐ ๐๐๐ ๐ฒ๐๐๐๐๐๐ ๐๐ข ๐๐๐๐๐๐ฃ๐ ๐ ๐ผ๐๐๐๐๐`,
thumbnailUrl: 'https://files.catbox.moe/5bzcdl.jpg',
sourceUrl: global.linksaluran,
mediaType: 1,
renderLargerThumbnail: true
}
}
}, {
quoted: m
})
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
break
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
//My adittions
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
case 'play': case 'ytplay': case 'yts': case 'ytsearch': case 'youtubesearch': {
if (!text) return m.reply(`Example: ${prefix + command} dj komang`)
m.reply(msg.wait)
try {
const res = await yts.search(text);
const higay = pickRandom(res.all)
const fuckshit = `*๐Title:* ${higay.title || 'Not available'}\n*โDescription:* ${higay.description || 'Not available'}\n*๐Channel:* ${higay.author?.name || 'Not available'}\n*โณDuration:* ${higay.seconds || 'Not available'} seconds (${higay.timestamp || 'Not available'})\n*๐Source:* ${higay.url || 'Not available'}\n\n_note: if you want to download_\n_choose ${prefix}ytmp3 video_url or ${prefix}ytmp4 video_url_`;
await m.reply({ image: { url: higay.thumbnail }, caption: fuckshit })
} catch (e) {
try {
const nvl = new NvlGroup();
let anu = await nvl.search(text);
let higay = pickRandom(anu.videos)
let fuckshit = `*๐Title:* ${higay.title || 'Not available'}\n*โUploaded At:* ${higay.uploaded || 'Not available'}\n*๐Channel:* ${higay.author || 'Not available'}\n*โณDuration:* ${higay.duration || 'Not available'}\n*๐Source:* ${higay.url || 'Not available'}\n\n_note: if you want to download_\n_choose ${prefix}ytmp3 video_url or ${prefix}ytmp4 video_url_`;
await m.reply({ image: { url: higay.thumbnail }, caption: fuckshit })
} catch (e) {
try {
const res = await fetchApi('/search/youtube', { query: text });
const higay = pickRandom(res.data)
const fuckshit = `*๐Title:* ${higay.title || 'Not available'}\n*โDescription:* ${higay.description || 'Not available'}\n*๐Channel:* ${higay.channelTitle || 'Not available'}\n*โณDuration:* ${higay.duration || 'Not available'}\n*๐Source:* https://youtu.be/${higay.id || 'Not available'}\n\n_note: if you want to download_\n_choose ${prefix}ytmp3 video_url or ${prefix}ytmp4 video_url_`;
await m.reply({ image: { url: higay.thumbMedium }, caption: fuckshit })
} catch (e) {
m.reply('Post not available!')
}
}
}
}
break
//song
case "song": case "songdown":
case "downsong": {
if (!text) return ReplyTkm(`Example: ${prefix + command} url`);
ReplyTkm('Tunggu sebentar kak...');
try {
let api = await fetch(`https://rest.cloudkuimages.xyz/api/download/soundcloud?url=${text}`);
let data = await api.json();
if (!data.status) return ReplyTkm('Download failed! Try again later.');
let caption = `ไน *SOUNDCLOUD DOWNLOADER* โฆ\n\n`;
caption += `ไน *Status* : ${data.status}\n`;
caption += `ไน *Creator* : ${data.creator}\n`;
caption += `ไน *Title* : ${data.result.title}\n`;
caption += `ไน *Thumbnail* : ${data.result.image}\n`;
caption += `ไน *Download* : ${data.result.download}\n`;
await Tkm.sendMessage(m.chat, { image: { url: data.result.image }, caption: caption });
await Tkm.sendMessage(m.chat, { audio: { url: data.result.download }, mimetype: "audio/mpeg" });
} catch (e) {
console.log(e);
ReplyTkm('Error occurred while downloading!');
}
}
break
case "google": {
const axios = require("axios");
if (!text) {
ReplyTkm('Provide a search term!\nEg: .Google What is treason')
return;
}
let {
data
} = await axios.get(`https://www.googleapis.com/customsearch/v1?q=${text}&key=AIzaSyDMbI3nvmQUrfjoCJYLS69Lej1hSXQjnWI&cx=baf9bdb0c631236e5`)
if (data.items.length == 0) {
ReplyTkm("โ Unable to find a result")
return;
}
let tex = `SEARCH FROM GOOGLE\n๐ Term:- ${text}\n\n`;
for (let i = 0; i < data.items.length; i++) {
tex += `๐ชง Title:- ${data.items[i].title}\n๐ฅ Description:- ${data.items[i].snippet}\n๐ Link:- ${data.items[i].link}\n\n`
}
ReplyTkm(tex)
}
break;
case "llama":
{
if (!text) return ReplyTkm(`Hello I'm RAVEN AI. How can i help u?`);
let d = await fetchJson(
`https://bk9.fun/ai/llama?q=${text}`
);
if (!d.BK9) {
return ReplyTkm(
"An error occurred while fetching the AI chatbot response. Please try again later."
);
} else {
ReplyTkm(d.BK9);
}
}
break;
case 'define': {
try {
if (!text) {
return ReplyTkm('Please provide a word.');
}
const word = encodeURIComponent(text);
const response = await fetch(`https://api.dictionaryapi.dev/api/v2/entries/en/${word}`);
if (!response.ok) {
return ReplyTkm('Failed to fetch data. Please try again later.');
}
const data = await response.json();
if (!data || !data[0] || !data[0].meanings || data[0].meanings.length === 0) {
return ReplyTkm('No definitions found for the provided word.');
}
const definitionData = data[0];
const definition = definitionData.meanings[0].definitions[0].definition;
const message = `${definition}`;
await Tkm.sendMessage(m.chat, { text: message }, { quoted: m });
} catch (error) {
console.error("Error occurred:", error);
ReplyTkm('An error occurred while fetching the data. Please try again later.\n' + error);
}
}
break;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
case 'yts': case 'ytsearch': {
if (!text) return await ReplyTkm(`*Example :* ${prefix + command} title`);
try {
let yts = require("yt-search");
let search = await yts(text);
let videos = search.all;
console.log(videos);
if (!videos || videos.length === 0) {
return await ReplyTkm('โ No video found');
}
// Prepare the combined message for up to 10 videos
let message = `*Search Results for: ${text}*\n\n`;
const numVideos = Math.min(videos.length, 10); // Send up to 10 videos, or fewer if there are less than 10
for (let i = 0; i < numVideos; i++) {
const video = videos[i];
message += `\n๐น *Title:* _${video.title}_\n` +
`โณ *Duration:* _${video.timestamp}_ _(${video.seconds} seconds)_\n` +
`๐๏ธ *Uploaded:* _${video.ago}_\n` +
`๐ *Views:* _${video.views.toLocaleString()}_ _views_\n` +
`๐ค *Author:* _${video.author.name}_\n` +
`๐ *URL:* ${video.url}\n`;
}
// Send the combined message with all the details
await ReplyTkm(message);
} catch (e) {
console.error(e);
await ReplyTkm('โ ๏ธ Error: Something went wrong while fetching video details.');
}
}
break;
/*
case 'play':{
const axios = require('axios');
const yts = require("yt-search");
const ffmpeg = require("fluent-ffmpeg");
const fs = require("fs");
const path = require("path");
try {
if (!text) return ReplyTkm("What song do you want to download?");
let search = await yts(text);
let link = search.all[0].url;
const apis = [
`https://xploader-api.vercel.app/ytmp3?url=${link}`,
`https://apis.davidcyriltech.my.id/youtube/mp3?url=${link}`,
`https://api.ryzendesu.vip/api/downloader/ytmp3?url=${link}`,
`https://api.dreaded.site/api/ytdl/audio?url=${link}`
];
for (const api of apis) {
try {
let data = await fetchJson(api);
// Checking if the API response is successful
if (data.status === 200 || data.success) {
let videoUrl = data.result?.downloadUrl || data.url;
let outputFileName = `${search.all[0].title.replace(/[^a-zA-Z0-9 ]/g, "")}.mp3`;
let outputPath = path.join(__dirname, outputFileName);
const response = await axios({
url: videoUrl,
method: "GET",
responseType: "stream"
});
if (response.status !== 200) {
ReplyTkm("sorry but the API endpoint didn't respond correctly. Try again later.");
continue;
}
ffmpeg(response.data)
.toFormat("mp3")
.save(outputPath)
.on("end", async () => {
await Tkm.sendMessage(
m.chat,
{
document: { url: outputPath },
mimetype: "audio/mp3",
caption: "๐๐ข๐ช๐ก๐๐ข๐๐๐๐ ๐๐ฌ tkm",
fileName: outputFileName,
},
{ quoted: m }
);
fs.unlinkSync(outputPath);
})
.on("error", (err) => {
ReplyTkm("Download failed\n" + err.message);
});
return;
}
} catch (e) {
// Continue to the next API if one fails
continue;
}
}
ReplyTkm("An error occurred. All APIs might be down or unable to process the request.");
} catch (error) {
ReplyTkm("Download failed\n" + error.message);
}
}
break;
*/
/*
case 'play':{
if(!text) return ReplyTkm(`๐๐ญ๐๐ข๐ฅ๐ก๐ : .play tkm`)
try {
const search = await yts(text);
const telaso = search.all[0].url;
const result = await fetchJson(`https://api.siputzx.my.id/api/d/ytmp3?url=${telaso}`);
const puqii = result.data.dl;
await reaction(m.chat, 'โก');
await Tkm.sendMessage(m.chat, {
audio: { url: puqii },
mimetype: 'audio/mpeg',
fileName: 'By TKM.mp3',
contextInfo: {
forwardingScore: 100000,
isForwarded: true,
externalAdReplyTkm: {
showAdAttribution: false,
containsAutoReplyTkm: true,
mediaType: 1,
renderLargerThumbnail: true,
title: result.data.title,
body: ``,
previewType: "PHOTO",
thumbnailUrl: 'https://files.catbox.moe/5bzcdl.jpg',
}
}
}, { quoted: glxNull });
} catch (error) {
console.error('Error:', error);
await Tkm.sendMessage(m.chat, { text: 'an error occurred while processing your request.' }, { quoted: m });
}
}
break
case 'video': {
const yts = require("yt-search");
const fetch = require("node-fetch");
try {
if (!text) {
return ReplyTkm("What video you want to download?");
}
let search = await yts(text);
if (!search.all.length) {
return ReplyTkm(Tkm, m, "No results found for your query.");
}
let link = search.all[0].url;
const apiUrl = `https://apis-keith.vercel.app/download/dlmp4?url=${link}`;
let response = await fetch(apiUrl);
let data = await response.json();
if (data.status && data.result) {
const videoData = {
title: data.result.title,
downloadUrl: data.result.downloadUrl,
thumbnail: search.all[0].thumbnail,
format: data.result.format,
quality: data.result.quality,
};
await Tkm.sendMessage(
m.chat,
{
video: { url: videoData.downloadUrl },
mimetype: "video/mp4",
caption: "๐๐ข๐ช๐ก๐๐ข๐๐๐๐ ๐๐ฌTKM",
},
{ quoted: m }
);
return;
} else {
return ReplyTkm("Unable to fetch the video. Please try again later.");
}
} catch (error) {
return ReplyTkm(`An error occurred: ${error.message}`);
}
};
break;
*/
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
case "img": case "ai-img": case "image": case "images":{
var gis = require('g-i-s');
if (!text) return ReplyTkm("Provide a text");
try {
// Use the 'text' as the search term for images
gis(text, async (error, results) => {
if (error) {
return ReplyTkm("An error occurred while searching for images.\n" + error);
}
// Check if results are found
if (results.length === 0) {
return ReplyTkm("No images found.");
}
// Limit the number of images to send (e.g., 5)
const numberOfImages = Math.min(results.length, 5);
const imageUrls = results.slice(0, numberOfImages).map(result => result.url);
// Send the images
const messages = imageUrls.map(url => ({
image: { url },
caption: `Downloaded by tkm`
}));
for (const message of messages) {
await Tkm.sendMessage(m.chat, message, { quoted: m });
}
});
} catch (e) {
ReplyTkm("An error occurred.\n" + e);
}
}
break;
case "lyrics": {
const fetch = require('node-fetch');
const apiUrl = `https://api.dreaded.site/api/lyrics?title=${encodeURIComponent(text)}`;
try {
if (!text) return ReplyTkm("Provide a song name!");
const data = await fetchJson(apiUrl);
if (!data.success || !data.result || !data.result.lyrics) {
return ReplyTkm(`Sorry, I couldn't find any lyrics for "${text}".`);
}
const { title, artist, link, thumb, lyrics } = data.result;
const imageUrl = thumb || "https://i.imgur.com/Cgte666.jpeg";
const imageBuffer = await fetch(imageUrl)
.then(res => res.buffer())
.catch(err => {
console.error('Error fetching image:', err);
return null;
});
if (!imageBuffer) {
return ReplyTkm("An error occurred while fetching the image.");
}
const caption = `**Title**: ${title}\n**Artist**: ${artist}\n\n${lyrics}`;
await Tkm.sendMessage(
m.chat,
{
image: imageBuffer,
caption: caption
},
{ quoted: m }
);
} catch (error) {
console.error(error);
ReplyTkm(`An error occurred while fetching the lyrics for "${text}".`);
}
}
break;
/*
case 'darkgpt':{
if (!text) { return ReplyTkm("Hey there Fuckface๐, I'm Darkgpt, I respond to anything be it harmful, I'm a pure Evil๐ฟ, What sort of dark and delightful nonsense do you want to dive into Today๐ ?");
}
try {
const data = await fetchJson(`https://www.laurine.site/api/ai/heckai?query=${text}`);
if (data && data.result) {
const res = data.result;
await ReplyTkm(res);
} else {
ReplyTkm("Huh, the silence is deafening, no response whatsoever๐.The API seems to have vanished into the abyss...๐");
}
} catch (error) {
ReplyTkm('An error occured while communicating with the APIs\n' + error);
}
}
break;
*/
case "ai":
case "ai2":
if (!args.length) {
return ReplyTkm("Please enter a question for AI.\n\nExample: *TKM Who are You?*");
}
let query = encodeURIComponent(args.join(" "));
let apiUrl3 = `https://www.laurine.site/api/ai/heckai?query=${query}`;
try {
let response = await fetch(apiUrl3);
let data = await response.json();
if (!data.status || !data.data) {
return ReplyTkm("โ AI cannot provide an answer.");
}
ReplyTkm(`๐ค *AI Response:*\n\n${data.data}`);
} catch (error) {
console.error(error);
ReplyTkm("โ An error occurred while accessing AI.");
}
break
case 'gpt':{
if (!text) return ReplyTkm(`Example: ${cmd} axios`)
async function sanzmd(prompt) {
const response = await axios({
method: "POST",
url: "https://chateverywhere.app/api/chat",
headers: {
"Content-Type": "application/json",
"Cookie": "_ga=GA1.1.34196701.1707462626; _ga_ZYMW9SZKVK=GS1.1.1707462625.1.0.1707462625.60.0.0; ph_phc_9n85Ky3ZOEwVZlg68f8bI3jnOJkaV8oVGGJcoKfXyn1_posthog=%7B%22distinct_id%22%3A%225aa4878d-a9b6-40fb-8345-3d686d655483%22%2C%22%24sesid%22%3A%5B1707462733662%2C%22018d8cb4-0217-79f9-99ac-b77f18f82ac8%22%2C1707462623766%5D%7D",
Origin: "https://chateverywhere.app",
Referer: "https://chateverywhere.app/id",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
},
data: {
model: {
id: "gpt-3.5-turbo-0613",
name: "GPT-3.5",