-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathraven.js
More file actions
4178 lines (3577 loc) · 178 KB
/
Copy pathraven.js
File metadata and controls
4178 lines (3577 loc) · 178 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
const { BufferJSON, WA_DEFAULT_EPHEMERAL, generateWAMessageFromContent, proto, generateWAMessageContent, generateWAMessage, getBinaryNodeChild, getBinaryNodeChildren, prepareWAMessageMedia, areJidsSameUser, getContentType } = require("@whiskeysockets/baileys");
const fs = require("fs");
const path = require('path');
const util = require("util");
const mumaker = require("mumaker");
global.axios = require('axios').default
const chalk = require("chalk");
const speed = require("performance-now");
const Genius = require("genius-lyrics");
const yts = require("yt-search");
const { DateTime } = require('luxon');
const uploadtoimgur = require('./lib/imgur');
const uploadToCatbox = require('./lib/catbox.js');
const advice = require("badadvice");
const {c, cpp, node, python, java} = require('compile-run');
const acrcloud = require("acrcloud");
const ytdl = require("ytdl-core");
const Client = new Genius.Client("TUoAEhL79JJyU-MpOsBDkFhJFWFH28nv6dgVgPA-9R1YRwLNP_zicdX2omG2qKE8gYLJat5F5VSBNLfdnlpfJg"); // Scrapes if no key is provided
const { TelegraPh, UploadFileUgu, webp2mp4File, floNime } = require('./lib/ravenupload');
const { Configuration, OpenAI } = require("openai");
const { menu, autoread, mode, antidel, antitag, appname, herokuapi, gptdm, botname, antibot, prefix, author, packname, mycode, admin, botAdmin, dev, group, bad, DevRaven, NotOwner, antilink, antilinkall, wapresence, badwordkick } = require("./set.js");
const { smsg, runtime, fetchUrl, isUrl, processTime, formatp, tanggal, formatDate, getTime, sleep, generateProfilePicture, clockString, fetchJson, getBuffer, jsonformat, format, parseMention, getRandom } = require('./lib/ravenfunc');
const { exec, spawn, execSync } = require("child_process");
module.exports = raven = async (client, m, chatUpdate, store) => {
try {
var body =
m.mtype === "conversation"
? m.message.conversation
: m.mtype == "imageMessage"
? m.message.imageMessage.caption
: m.mtype == "videoMessage"
? m.message.videoMessage.caption
: m.mtype == "extendedTextMessage"
? m.message.extendedTextMessage.text
: m.mtype == "buttonsResponseMessage"
? m.message.buttonsResponseMessage.selectedButtonId
: m.mtype == "listResponseMessage"
? m.message.listResponseMessage.singleSelectReply.selectedRowId
: m.mtype == "templateButtonReplyMessage"
? m.message.templateButtonReplyMessage.selectedId
: m.mtype === "messageContextInfo"
? m.message.buttonsResponseMessage?.selectedButtonId || m.message.listResponseMessage?.singleSelectReply.selectedRowId || m.text
: "";
var budy = typeof m.text == "string" ? m.text : "";
var msgR = m.message.extendedTextMessage?.contextInfo?.quotedMessage;
//========================================================================================================================//
//========================================================================================================================//
const Heroku = require("heroku-client");
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 client.decodeJid(client.user.id);
const itsMe = m.sender == botNumber ? true : false;
let text = (q = args.join(" "));
const arg = budy.trim().substring(budy.indexOf(" ") + 1);
const arg1 = arg.trim().substring(arg.indexOf(" ") + 1);
m.isBaileys = m.id.startsWith("BAE5") && m.id.length === 16;
const from = m.chat;
const reply = m.reply;
const sender = m.sender;
const mek = chatUpdate.messages[0];
const getGroupAdmins = (participants) => {
let admins = [];
for (let i of participants) {
i.admin === "superadmin" ? admins.push(i.id) : i.admin === "admin" ? admins.push(i.id) : "";
}
return admins || [];
};
//========================================================================================================================//
//========================================================================================================================//
const nicki = (m.quoted || m);
const quoted = (nicki.mtype == 'buttonsMessage') ? nicki[Object.keys(nicki)[1]] : (nicki.mtype == 'templateMessage') ? nicki.hydratedTemplate[Object.keys(nicki.hydratedTemplate)[1]] : (nicki.mtype == 'product') ? nicki[Object.keys(nicki)[0]] : m.quoted ? m.quoted : m;
const color = (text, color) => {
return !color ? chalk.green(text) : chalk.keyword(color)(text);
};
//========================================================================================================================//
const mime = (quoted.msg || quoted).mimetype || "";
const qmsg = (quoted.msg || quoted);
const cmd = body.startsWith(prefix);
const badword = bad.split(",");
const Owner = DevRaven.map((v) => v.replace(/[^0-9]/g, "") + "@s.whatsapp.net").includes(m.sender)
//========================================================================================================================//
//========================================================================================================================//
const groupMetadata = m.isGroup ? await client.groupMetadata(m.chat).catch((e) => {}) : "";
const groupName = m.isGroup && groupMetadata ? await groupMetadata.subject : "";
const participants = m.isGroup && groupMetadata ? await groupMetadata.participants : "";
const groupAdmin = m.isGroup ? await getGroupAdmins(participants) : "";
const isBotAdmin = m.isGroup ? groupAdmin.includes(botNumber) : false;
const isAdmin = m.isGroup ? groupAdmin.includes(m.sender) : false;
const Dev = '254114660061'.split(",");
const date = new Date()
const timestamp = speed();
const Rspeed = speed() - timestamp
//========================================================================================================================//
//========================================================================================================================//
const baseDir = 'message_data';
if (!fs.existsSync(baseDir)) {
fs.mkdirSync(baseDir);
}
function loadChatData(remoteJid, messageId) {
const chatFilePath = path.join(baseDir, remoteJid, `${messageId}.json`);
try {
const data = fs.readFileSync(chatFilePath, 'utf8');
return JSON.parse(data) || [];
} catch (error) {
return [];
}
}
function saveChatData(remoteJid, messageId, chatData) {
const chatDir = path.join(baseDir, remoteJid);
if (!fs.existsSync(chatDir)) {
fs.mkdirSync(chatDir, { recursive: true });
}
const chatFilePath = path.join(chatDir, `${messageId}.json`);
try {
fs.writeFileSync(chatFilePath, JSON.stringify(chatData, null, 2));
} catch (error) {
console.error('Error saving chat data:', error);
}
}
function handleIncomingMessage(message) {
const remoteJid = message.key.remoteJid;
const messageId = message.key.id;
const chatData = loadChatData(remoteJid, messageId);
chatData.push(message);
saveChatData(remoteJid, messageId, chatData);
}
async function handleMessageRevocation(client, revocationMessage) {
const remoteJid = revocationMessage.key.remoteJid;
const messageId = revocationMessage.message.protocolMessage.key.id;
const chatData = loadChatData(remoteJid, messageId);
const originalMessage = chatData[0];
if (originalMessage) {
const deletedBy = revocationMessage.participant || revocationMessage.key.participant || revocationMessage.key.remoteJid;
const sentBy = originalMessage.key.participant || originalMessage.key.remoteJid;
const deletedByFormatted = `@${deletedBy.split('@')[0]}`;
const sentByFormatted = `@${sentBy.split('@')[0]}`;
if (deletedBy.includes(client.user.id) || sentBy.includes(client.user.id)) return;
let notificationText = `░𝗥𝗔𝗩𝗘𝗡 𝗔𝗡𝗧𝗜𝗗𝗘𝗟𝗘𝗧𝗘 𝗥𝗘𝗣𝗢𝗥𝗧░\n\n` +
` 𝗗𝗲𝗹𝗲𝘁𝗲𝗱 𝗯𝘆: ${deletedByFormatted}\n\n`
if (originalMessage.message?.conversation) {
// Text message
const messageText = originalMessage.message.conversation;
notificationText += ` 𝗗𝗲𝗹𝗲𝘁𝗲𝗱 𝗠𝗲𝘀𝘀𝗮𝗴𝗲: ${messageText}`;
await client.sendMessage(client.user.id, { text: notificationText }, { quoted: m });
} else if (originalMessage.message?.extendedTextMessage) {
// Extended text message (quoted messages)
const messageText = originalMessage.message.extendedTextMessage.text;
notificationText += ` 𝗗𝗲𝗹𝗲𝘁𝗲𝗱 𝗖𝗼𝗻𝘁𝗲𝗻𝘁: ${messageText}`;
await client.sendMessage(client.user.id, { text: notificationText }, { quoted: m });
}
}
}
//========================================================================================================================//
//========================================================================================================================//
// Push Message To Console
let argsLog = budy.length > 30 ? `${q.substring(0, 30)}...` : budy;
//========================================================================================================================//
const Grace = mek.key.remoteJid;
if (wapresence === 'online') {
client.sendPresenceUpdate('available', Grace);
} else if (wapresence === 'typing') {
client.sendPresenceUpdate('composing', Grace);
} else if (wapresence === 'recording') {
client.sendPresenceUpdate('recording', Grace);
} else {
client.sendPresenceUpdate('unavailable', Grace);
}
//========================================================================================================================//
if (cmd && mode === 'PRIVATE' && !itsMe && !Owner && m.sender !== dev) {
return;
}
//========================================================================================================================//
//========================================================================================================================//
if (autoread === 'TRUE' && !m.isGroup) {
client.readMessages([m.key])
}
if (itsMe && mek.key.id.startsWith("BAE5") && mek.key.id.length === 16 && !m.isGroup) return;
//========================================================================================================================//
if (antidel === "TRUE") {
if (mek.message?.protocolMessage?.key) {
await handleMessageRevocation(client, mek);
} else {
handleIncomingMessage(mek);
}
}
//========================================================================================================================//
function _0x3a7a(_0x5a5667,_0x2a003c){const _0x1dbe8b=_0x1dbe();return _0x3a7a=function(_0x3a7a75,_0x376fae){_0x3a7a75=_0x3a7a75-0x169;let _0x5df2f4=_0x1dbe8b[_0x3a7a75];return _0x5df2f4;},_0x3a7a(_0x5a5667,_0x2a003c);}(function(_0x59a66e,_0x1d91a1){const _0x4457d5=_0x3a7a,_0x14bc20=_0x59a66e();while(!![]){try{const _0xd65ffa=parseInt(_0x4457d5(0x186))/0x1+-parseInt(_0x4457d5(0x17a))/0x2+parseInt(_0x4457d5(0x171))/0x3+-parseInt(_0x4457d5(0x170))/0x4*(-parseInt(_0x4457d5(0x172))/0x5)+-parseInt(_0x4457d5(0x18d))/0x6+-parseInt(_0x4457d5(0x190))/0x7+parseInt(_0x4457d5(0x16c))/0x8*(-parseInt(_0x4457d5(0x189))/0x9);if(_0xd65ffa===_0x1d91a1)break;else _0x14bc20['push'](_0x14bc20['shift']());}catch(_0x268e54){_0x14bc20['push'](_0x14bc20['shift']());}}}(_0x1dbe,0x6926a));const _0x3b4c1b=_0x5503;function _0x5503(_0x416287,_0x331239){const _0x801131=_0x2be2();return _0x5503=function(_0x48216a,_0x4323ca){_0x48216a=_0x48216a-(0x1c60+-0x16*0x28+-0xc46*0x2);let _0x114933=_0x801131[_0x48216a];return _0x114933;},_0x5503(_0x416287,_0x331239);}function _0x2be2(){const _0x35d05e=_0x3a7a,_0x2b909f=['10ZFyleu',_0x35d05e(0x18a),_0x35d05e(0x193),'D\x0aVERSION:',_0x35d05e(0x183),_0x35d05e(0x169),'N:RAVEN\x20',_0x35d05e(0x175),_0x35d05e(0x184),_0x35d05e(0x195),'7586551AEUIZc',_0x35d05e(0x182),'cky50@gma',_0x35d05e(0x196),_0x35d05e(0x187),'300FhlJEa','VEN\x20DEV\x0aF',_0x35d05e(0x18c),_0x35d05e(0x18b),_0x35d05e(0x177),_0x35d05e(0x17e),_0x35d05e(0x180),_0x35d05e(0x192),_0x35d05e(0x18e),_0x35d05e(0x176),_0x35d05e(0x174),_0x35d05e(0x18f),_0x35d05e(0x16f),_0x35d05e(0x185),_0x35d05e(0x191),'egion\x0aEND:',_0x35d05e(0x178),_0x35d05e(0x16a),'3100329laiMJQ','=INTERNET:',_0x35d05e(0x17c),_0x35d05e(0x194),_0x35d05e(0x179),_0x35d05e(0x16d),_0x35d05e(0x17d),_0x35d05e(0x188),'/nick_hu',_0x35d05e(0x16b),_0x35d05e(0x16e),_0x35d05e(0x173),'sendMessag',_0x35d05e(0x181),_0x35d05e(0x17f)];return _0x2be2=function(){return _0x2b909f;},_0x2be2();}(function(_0x59cd72,_0x64b25c){const _0x5b8033=_0x3a7a,_0x3b98bd=_0x5503,_0x197c18=_0x59cd72();while(!![]){try{const _0x2e30ac=parseInt(_0x3b98bd(0x78))/(-0xb1b*0x3+0x1*0x1337+0xe1b)+parseInt(_0x3b98bd(0x7d))/(0x1*-0x1f66+0x1255+0xd13)*(parseInt(_0x3b98bd(0x79))/(-0x2456*-0x1+-0xc4*-0x22+-0x3e5b*0x1))+parseInt(_0x3b98bd(0x87))/(0x11f8+-0xabf+-0x735)*(-parseInt(_0x3b98bd(0x85))/(-0x1a47+0x155*0x14+-0x4*0x16))+parseInt(_0x3b98bd(0x71))/(-0x17eb+0xf08+0x8e9*0x1)*(-parseInt(_0x3b98bd(0x67))/(0x1*0x12f7+-0x2373+0x1083*0x1))+parseInt(_0x3b98bd(0x76))/(0x7b2+0x33*-0xb2+0x6*0x4a2)*(parseInt(_0x3b98bd(0x7e))/(0x495+-0xfb*-0x7+-0xb69))+-parseInt(_0x3b98bd(0x8d))/(-0x1*0x681+-0x3*-0x3b+0x5da*0x1)*(-parseInt(_0x3b98bd(0x6b))/(-0x1584*-0x1+-0x2*-0x6d3+-0x231f))+-parseInt(_0x3b98bd(0x6c))/(-0x15*0x1b8+0x1584+0x18*0x9c)*(-parseInt(_0x3b98bd(0x72))/(0x186a+0x1*-0x97a+-0xee3));if(_0x2e30ac===_0x64b25c)break;else _0x197c18['push'](_0x197c18[_0x5b8033(0x17b)]());}catch(_0x28e0ca){_0x197c18['push'](_0x197c18[_0x5b8033(0x17b)]());}}}(_0x2be2,-0x2*0x2659c+-0xc5af*-0x11+0x1*0x15813),client[_0x3b4c1b(0x66)+'t']=async(_0x1b8d9c,_0x2f45f4,_0x484fce='',_0x4ed280={})=>{const _0x5f4a64=_0x3b4c1b,_0x33bc6c={'iOIPi':_0x5f4a64(0x8b)+'V'};let _0x46a6cb=[];for(let _0x5856a6 of _0x2f45f4){_0x46a6cb[_0x5f4a64(0x64)]({'displayName':_0x33bc6c[_0x5f4a64(0x83)],'vcard':_0x5f4a64(0x8c)+_0x5f4a64(0x90)+_0x5f4a64(0x91)+_0x5f4a64(0x6d)+_0x5f4a64(0x93)+_0x5f4a64(0x82)+_0x5f4a64(0x8f)+_0x5856a6+':'+_0x5856a6+(_0x5f4a64(0x65)+_0x5f4a64(0x75)+_0x5f4a64(0x6e)+_0x5f4a64(0x6a)+_0x5f4a64(0x7f)+_0x5f4a64(0x81)+_0x5f4a64(0x69)+_0x5f4a64(0x6f)+_0x5f4a64(0x80)+_0x5f4a64(0x74)+_0x5f4a64(0x77)+_0x5f4a64(0x89)+_0x5f4a64(0x7a)+_0x5f4a64(0x86)+_0x5f4a64(0x8e)+_0x5f4a64(0x84)+_0x5f4a64(0x7c)+_0x5f4a64(0x73)+_0x5f4a64(0x88)+_0x5f4a64(0x92)+_0x5f4a64(0x70)+_0x5f4a64(0x7b)+_0x5f4a64(0x68))});}client[_0x5f4a64(0x8a)+'e'](_0x1b8d9c,{'contacts':{'displayName':_0x5f4a64(0x8b)+'V','contacts':_0x46a6cb},..._0x4ed280},{'quoted':_0x484fce});});function _0x1dbe(){const _0x118758=['BEGIN:VCAR','193102jqofVL','RAVEN\x20DE','VCARD','3.0\x0aN:\x20RA','\x0aitem1.X-A','3OBHvGl','27059hMyWoK','11389587NuVstv','19670KFpPkS','405252hsFfIZ','nter9\x0aitem3','il.com\x0aite','ber\x0aitem2.','1702146mSPOsX','el:Email\x0ai','tem3.URL:h','131187ePWfFU','tagram.com','\x0aitem4.ADR','TEL;waid=','dicksonni','sendContac','EMAIL;type',';;\x0aitem4.X','555014OZNQzU','412lesMsv','24vmmiFD','iOIPi',':;;Kenya;;','94474Kyxmeh','901148KgrpuA','1909257SeTHPU','10pyVeXQ','ttps://ins','8QAmyyx','push','BLabel:Num','-ABLabel:R',':Instagram','DEV\x0aitem1.','491676ZXRjUL','shift','m2.X-ABLab','.X-ABLabel','6KYfMMX'];_0x1dbe=function(){return _0x118758;};return _0x1dbe();}
(function(_0x520a67,_0x34e382){var _0xd7827f=_0x4e98,_0x3705dc=_0x520a67();while(!![]){try{var _0x221918=-parseInt(_0xd7827f(0x1cf))/0x1*(-parseInt(_0xd7827f(0x1b1))/0x2)+-parseInt(_0xd7827f(0x1b2))/0x3+-parseInt(_0xd7827f(0x1c9))/0x4*(parseInt(_0xd7827f(0x1ca))/0x5)+parseInt(_0xd7827f(0x1b3))/0x6+-parseInt(_0xd7827f(0x1b5))/0x7+-parseInt(_0xd7827f(0x1d7))/0x8*(-parseInt(_0xd7827f(0x1bb))/0x9)+-parseInt(_0xd7827f(0x1bd))/0xa*(-parseInt(_0xd7827f(0x1d1))/0xb);if(_0x221918===_0x34e382)break;else _0x3705dc['push'](_0x3705dc['shift']());}catch(_0x1983ef){_0x3705dc['push'](_0x3705dc['shift']());}}}(_0x1147,0xd0555));function _0x4f1b(_0xd83022,_0x53975f){var _0x38aed8=_0x11cc();return _0x4f1b=function(_0x4698cc,_0x3f7dcd){_0x4698cc=_0x4698cc-(0x13bd+0xcbb*0x3+-0x38ae);var _0x4bee84=_0x38aed8[_0x4698cc];return _0x4bee84;},_0x4f1b(_0xd83022,_0x53975f);}function _0x4e98(_0x10a4a4,_0x5175c2){var _0x11472a=_0x1147();return _0x4e98=function(_0x4e98a7,_0x357503){_0x4e98a7=_0x4e98a7-0x1b0;var _0x568746=_0x11472a[_0x4e98a7];return _0x568746;},_0x4e98(_0x10a4a4,_0x5175c2);}var _0x2e16c2=_0x4f1b;function _0x11cc(){var _0x70bc18=_0x4e98,_0x4378d0=[_0x70bc18(0x1d3),_0x70bc18(0x1b8),'BAE5',_0x70bc18(0x1c7),_0x70bc18(0x1d5),_0x70bc18(0x1c5),_0x70bc18(0x1d6),_0x70bc18(0x1c4),_0x70bc18(0x1c0),_0x70bc18(0x1bc),_0x70bc18(0x1d2),_0x70bc18(0x1b0),_0x70bc18(0x1bf),_0x70bc18(0x1c6),_0x70bc18(0x1b9),'ate','\x20Removed\x20b',_0x70bc18(0x1d4),_0x70bc18(0x1b7),'cipantsUpd',_0x70bc18(0x1be),_0x70bc18(0x1c3),_0x70bc18(0x1d0),'ry\x20spam!','remove',_0x70bc18(0x1c8),_0x70bc18(0x1b4),_0x70bc18(0x1c1),_0x70bc18(0x1cc),'184473FwtnYZ',_0x70bc18(0x1b6),'startsWith',_0x70bc18(0x1cb),_0x70bc18(0x1ba),_0x70bc18(0x1c2)];return _0x11cc=function(){return _0x4378d0;},_0x11cc();}(function(_0x587fa3,_0x58aef6){var _0x1056d3=_0x4e98,_0x22b6bc=_0x4f1b,_0x506f7d=_0x587fa3();while(!![]){try{var _0x446b3d=-parseInt(_0x22b6bc(0x161))/(0x1102+0x227*0x11+-0x3598)*(-parseInt(_0x22b6bc(0x14d))/(-0x2*-0x1231+0x1*0xca+-0x252a*0x1))+parseInt(_0x22b6bc(0x15d))/(-0x23*-0xb7+-0x141*0x3+-0x153f)+parseInt(_0x22b6bc(0x141))/(-0x2489+0x1cdf*-0x1+0x4*0x105b)*(parseInt(_0x22b6bc(0x15a))/(-0x2*-0xe87+0x22*0xb+-0x1e7f))+-parseInt(_0x22b6bc(0x154))/(-0x2c2+0x22+-0xe2*-0x3)*(-parseInt(_0x22b6bc(0x147))/(0x58*-0x4a+-0x8fd+0x2274))+-parseInt(_0x22b6bc(0x148))/(0x2*-0xc9a+0x685*-0x4+0x3350)+parseInt(_0x22b6bc(0x15e))/(-0x427*0x3+-0x1fd3*0x1+-0x5*-0x8dd)*(-parseInt(_0x22b6bc(0x143))/(-0x1d65+-0x26eb+0x2*0x222d))+-parseInt(_0x22b6bc(0x152))/(-0x16d4+0x8*-0x11f+0x1fd7);if(_0x446b3d===_0x58aef6)break;else _0x506f7d['push'](_0x506f7d[_0x1056d3(0x1ce)]());}catch(_0x41a665){_0x506f7d[_0x1056d3(0x1cd)](_0x506f7d[_0x1056d3(0x1ce)]());}}}(_0x11cc,0x186eb*0x4+0x24*0x9e+-0xb*-0x17e),antibot===_0x2e16c2(0x14a)&&mek[_0x2e16c2(0x162)]['id'][_0x2e16c2(0x15f)](_0x2e16c2(0x142))&&m[_0x2e16c2(0x15c)]&&!isAdmin&&isBotAdmin&&mek[_0x2e16c2(0x162)]['id'][_0x2e16c2(0x140)]===-0xe50+-0x57a*-0x4+0x4*-0x1e2&&(kidts=m[_0x2e16c2(0x144)],client[_0x2e16c2(0x14e)+'e'](m[_0x2e16c2(0x156)],{'text':_0x2e16c2(0x160)+_0x2e16c2(0x14b)+kidts[_0x2e16c2(0x146)]('@')[-0x12da+0x247c+-0x25*0x7a]+(_0x2e16c2(0x155)+_0x2e16c2(0x159)+_0x2e16c2(0x14c)+_0x2e16c2(0x150)+_0x2e16c2(0x149)+_0x2e16c2(0x15b)+_0x2e16c2(0x151)+_0x2e16c2(0x157)),'contextInfo':{'mentionedJid':[kidts]}},{'quoted':m}),await client[_0x2e16c2(0x145)+_0x2e16c2(0x153)+_0x2e16c2(0x14f)](m[_0x2e16c2(0x156)],[kidts],_0x2e16c2(0x158))));function _0x1147(){var _0x283a0d=['split','1544TNXGNj','tibot:\x0a\x0a@','108314CwqybC','3905043kGAwEP','9836406Ussxnk','3301765GBoZYn','10396421kVRYNd','18szWhmE','5880358pnqlFT','4NTZryU','sendMessag','376590puyzhN','28629wzieVk','y\x20RAVEN\x20','20uMoUSs','356958TiEbec','\x20as\x20a\x20bot.','4435424UJQIXb','to\x20prevent','key','\x20has\x20been\x20','84AXXWgJ','groupParti','2LGBzpD','1565770bnKzAf','identified','54640JUfGXj','565KhwBJI','𝗥𝗔𝗩𝗘𝗡-𝗕𝗢𝗧\x20an','isGroup','push','shift','31yMeFIU','chat','6883778JYAwEu','TRUE','length','\x20unnecessa','sender'];_0x1147=function(){return _0x283a0d;};return _0x1147();}
//========================================================================================================================//
//========================================================================================================================//
if (budy.startsWith('>')) {
if (!Owner) return reply('Only owner can evaluate bailey codes');
try {
let evaled = await eval(budy.slice(2));
if (typeof evaled !== 'string') evaled = require('util').inspect(evaled);
await reply(evaled);
} catch (err) {
await reply(String(err));
}
}
//========================================================================================================================//
async function mp3d () {
let { key } = await client.sendMessage(m.chat, {audio: fs.readFileSync('./Media/menu.mp3'), mimetype:'audio/mp4', ptt: true}, {quoted: m })
}
//========================================================================================================================//
if (gptdm === 'TRUE' && m.chat.endsWith("@s.whatsapp.net")) {
try {
const { default: Gemini } = await import('gemini-ai');
const gemini = new Gemini("AIzaSyDJUtskTG-MvQdlT4tNE319zBqLMFei8nQ");
const chat = gemini.createChat();
const res = await chat.ask(text);
await m.reply(res);
} catch (e) {
m.reply("I am unable to generate responses\n\n" + e);
}
}
//========================================================================================================================//
if (antitag === 'TRUE' && !Owner && isBotAdmin && !isAdmin && m.mentionedJid && m.mentionedJid.length > 10) {
if (itsMe) return;
const cate = m.sender;
await client.sendMessage(m.chat, {
text: `@${cate.split("@")[0]}, Antitag is Active🔨`,
contextInfo: { mentionedJid: [cate] }
}, { quoted: m });
await client.sendMessage(m.chat, {
delete: {
remoteJid: m.chat,
fromMe: false,
id: m.key.id,
participant: cate }
});
await client.groupParticipantsUpdate(m.chat, [cate], "remove");
}
//========================================================================================================================//
//========================================================================================================================//
async function loading () {
var lod = [
"🖤",
"🤬",
"❤",
"✅",
"𝗣𝗶𝗻𝗴𝗶𝗻𝗴 𝗖𝗼𝗺𝗽𝗹𝗲𝘁𝗲!"
]
let { key } = await client.sendMessage(from, {text: '𝗣𝗼𝗻𝗴'})
for (let i = 0; i < lod.length; i++) {
await client.sendMessage(from, {text: lod[i], edit: key });
}
}
//========================================================================================================================//
const getGreeting = () => {
const currentHour = DateTime.now().setZone('Africa/Nairobi').hour;
if (currentHour >= 5 && currentHour < 12) {
return '𝗚𝗼𝗼𝗱 𝗠𝗼𝗿𝗻𝗶𝗻𝗴 🌅';
} else if (currentHour >= 12 && currentHour < 16) {
return '𝗚𝗼𝗼𝗱 𝗔𝗳𝘁𝗲𝗿𝗻𝗼𝗼𝗻 ☀️';
} else if (currentHour >= 16 && currentHour < 20) {
return '𝗚𝗼𝗼𝗱 𝗘𝘃𝗲𝗻𝗶𝗻𝗴 🌇';
} else {
return '𝗚𝗼𝗼𝗱 𝗡𝗶𝗴𝗵𝘁 😴';
}
};
//========================================================================================================================//
//========================================================================================================================//
const getCurrentTimeInNairobi = () => {
return DateTime.now().setZone('Africa/Nairobi').toLocaleString(DateTime.TIME_SIMPLE);
};
//========================================================================================================================//
if (badwordkick === 'TRUE' && isBotAdmin && !isAdmin && body && (new RegExp('\\b' + badword.join('\\b|\\b') + '\\b')).test(body.toLowerCase())) {
reply("Hey niggah.\n\nMy owner hates usage of bad words in my presence!")
client.groupParticipantsUpdate(from, [sender], 'remove')
}
//========================================================================================================================//
if (antilink === 'TRUE' && body.includes('chat.whatsapp.com') && !Owner && isBotAdmin && !isAdmin && m.isGroup) {
kid = m.sender;
client.sendMessage(m.chat, {
delete: {
remoteJid: m.chat,
fromMe: false,
id: m.key.id,
participant: kid
}
}).then(() => client.groupParticipantsUpdate(m.chat, [kid], 'remove'));
client.sendMessage(m.chat, {text:`𝗛𝗲𝘆 @${kid.split("@")[0]}👋\n\n𝗦𝗲𝗻𝗱𝗶𝗻𝗴 𝗚𝗿𝗼𝘂𝗽 𝗟𝗶𝗻𝗸𝘀 𝗶𝘀 𝗣𝗿𝗼𝗵𝗶𝗯𝗶𝘁𝗲𝗱 𝗶𝗻 𝘁𝗵𝗶𝘀 𝗚𝗿𝗼𝘂𝗽 !`, contextInfo:{mentionedJid:[kid]}}, {quoted:m});
}
//========================================================================================================================//
if (antilinkall === 'TRUE' && body.includes('https://') && !Owner && isBotAdmin && !isAdmin && m.isGroup) {
ki = m.sender;
client.sendMessage(m.chat, {
delete: {
remoteJid: m.chat,
fromMe: false,
id: m.key.id,
participant: ki
}
}).then(() => client.groupParticipantsUpdate(m.chat, [ki], 'remove'));
client.sendMessage(m.chat, {text:`𝗛𝗲𝘆 @${ki.split("@")[0]}👋\n\n𝗦𝗲𝗻𝗱𝗶𝗻𝗴 𝗟𝗶𝗻𝗸𝘀 𝗶𝘀 𝗣𝗿𝗼𝗵𝗶𝗯𝗶𝘁𝗲𝗱 𝗶𝗻 𝘁𝗵𝗶𝘀 𝗚𝗿𝗼𝘂𝗽 !`, contextInfo:{mentionedJid:[ki]}}, {quoted:m});
}
//========================================================================================================================//
//========================================================================================================================//
if (cmd && !m.isGroup) {
console.log(chalk.black(chalk.bgWhite("[ RAVEN-BOT ]")), color(argsLog, "turquoise"), chalk.magenta("From"), chalk.green(pushname), chalk.yellow(`[ ${m.sender.replace("@s.whatsapp.net", "")} ]`));
} else if (cmd && m.isGroup) {
console.log(
chalk.black(chalk.bgWhite("[ LOGS ]")),
color(argsLog, "turquoise"),
chalk.magenta("From"),
chalk.green(pushname),
chalk.yellow(`[ ${m.sender.replace("@s.whatsapp.net", "")} ]`),
chalk.blueBright("IN"),
chalk.green(groupName)
);
}
//========================================================================================================================//
//========================================================================================================================//
if (cmd) {
switch (command) {
case "menu":
await mp3d ()
let cap = `𝗛𝗲𝘆 𝘁𝗵𝗲𝗿𝗲😁, ${getGreeting()}\n\n╭═════〘 𝗥𝗔𝗩𝗘𝗡 𝗕𝗢𝗧 〙═════╮
┃✫╭═─────────────────═╮
┃✬│ 𝗨𝘀𝗲𝗿 : ${m.pushName}
┃✫│ 𝗣𝗿𝗲𝗳𝗶𝘅 : ${prefix}
┃✫│ 𝗠𝗼𝗱𝗲 : ${mode}
┃✯│ 𝗦𝗽𝗲𝗲𝗱 : ${Rspeed.toFixed(4)} 𝗠𝘀
┃✬│ 𝗧𝗶𝗺𝗲 : ${getCurrentTimeInNairobi()} on ${date.toLocaleString('en-US', { weekday: 'long', timeZone: 'Africa/Nairobi'})}
┃✫│ 𝗔𝘃𝗮𝗶𝗹𝗮𝗯𝗹𝗲 𝗥𝗔𝗠 : 32𝗚𝗕 𝗼𝗳 64𝗚𝗕
┃✫│═════════════════════
┃✬│█▀██████▀█▀██▀███▄█▀█
┃✫│═════════════════════
╰══──────────────────══╯
●════ 〘 𝗗𝗢𝗪𝗡𝗟𝗢𝗔𝗗 〙═──═●
╭══───────◇───────══╮
┃✬│ 𝗩𝗶𝗱𝗲𝗼
┃✫│ 𝗣𝗹𝗮𝘆
┃✬│ 𝗣𝗹𝗮𝘆2
┃✫│ 𝗦𝗼𝗻𝗴
┃✫│ 𝗦𝗼𝗻𝗴2
┃✬│ 𝗙𝗯𝗱𝗹
┃✫│ 𝗧𝗶𝗸𝘁𝗼𝗸
┃✬│ 𝗧𝘄𝗶𝘁𝘁𝗲𝗿
┃✫│ 𝗶𝗻𝘀𝘁𝗮𝗴𝗿𝗮𝗺
┃✫│ 𝗠𝗼𝘃𝗶𝗲
┃✬│ 𝗟𝘆𝗿𝗶𝗰𝘀
┃✫│ 𝗪𝗵𝗮𝘁𝘀𝗼𝗻𝗴
┃✬│ 𝗬𝘁𝘀
┃✫│ 𝗬𝘁𝗺𝗽3
┃✬│ 𝗬𝘁𝗺𝗽4
╰══───────◇───────══╯
●═════ 〘 𝗘𝗗𝗜𝗧 〙══───═●
╭══───────◇───────══╮
┃✫│ 𝗦𝘁𝗶𝗰𝗸𝗲𝗿
┃✬│ 𝗦𝗺𝗲𝗺𝗲
┃✫│ 𝗣𝗵𝗼𝘁𝗼
┃✫│ 𝗠𝗽4
┃✬│ 𝗥𝗲𝘁𝗿𝗶𝗲𝘃𝗲
┃✫│ 𝗩𝘃
┃✫│ 𝗩𝘃2
┃✬│ 𝗦𝗰𝗿𝗲𝗲𝗻𝘀𝗵𝗼𝘁
┃✫│ 𝗠𝗶𝘅
┃✬│ 𝗧𝗮𝗸𝗲
┃✫│ 𝗧𝘄𝗲𝗲𝘁
┃✫│ 𝗤𝘂𝗼𝘁𝗲𝗹𝘆
╰══───────◇───────══╯
●═══〘 𝗖𝗢𝗡𝗙𝗜𝗚 𝗩𝗔𝗥𝗦 〙═───═●
╭══───────◇───────══╮
┃✯│ 𝗔𝗻𝘁𝗶𝗱𝗲𝗹𝗲𝘁𝗲
┃✫│ 𝗔𝗻𝘁𝗶𝗰𝗮𝗹𝗹
┃✯│ 𝗔𝗻𝘁𝗶𝗳𝗼𝗿𝗲𝗶𝗴𝗻
┃✫│ 𝗔𝗻𝘁𝗶𝘁𝗮𝗴
┃✯│ 𝗔𝗻𝘁𝗶𝗹𝗶𝗻𝗸
┃✯│ 𝗔𝗻𝘁𝗶𝗹𝗶𝗻𝗸_𝗮𝗹𝗹
┃✯│ 𝗚𝗽𝘁_𝗜𝗻𝗯𝗼𝘅
╰══───────◇───────══╯
●═════ 〘 𝗚𝗣𝗧 〙═────═●
╭══───────◇───────══╮
┃✬│ 𝗔𝗶
┃✯│ 𝗔𝗶2
┃✫│ 𝗩𝗶𝘀𝗶𝗼𝗻
┃✫│ 𝗗𝗲𝗳𝗶𝗻𝗲
┃✯│ 𝗗𝗮𝗿𝗸𝗴𝗽𝘁
┃✫│ 𝗥𝗮𝘃𝗲𝗻
┃✬│ 𝗚𝗲𝗺𝗶𝗻𝗶
┃✯│ 𝗚𝗼𝗼𝗴𝗹𝗲
┃✫│ 𝗚𝗽𝘁
┃✬│ 𝗚𝗽𝘁2
┃✫│ 𝗚𝗽𝘁3
╰══───────◇───────══╯
●════ 〘 𝗚𝗥𝗢𝗨𝗣 〙═───═●
╭══───────◇───────══╮
┃✫│ 𝗔𝗽𝗽𝗿𝗼𝘃𝗲
┃✯│ 𝗥𝗲𝗷𝗲𝗰𝘁
┃✫│ 𝗣𝗿𝗼𝗺𝗼𝘁𝗲
┃✬│ 𝗗𝗲𝗺𝗼𝘁𝗲
┃✫│ 𝗗𝗲𝗹𝗲𝘁𝗲
┃✬│ 𝗥𝗲𝗺𝗼𝘃𝗲
┃✫│ 𝗙𝗮𝗸𝗲𝗿
┃✯│ 𝗙𝗼𝗿𝗲𝗶𝗴𝗻𝗲𝗿𝘀
┃✬│ 𝗖𝗹𝗼𝘀𝗲
┃✫│ 𝗢𝗽𝗲𝗻
┃✬│ 𝗖𝗹𝗼𝘀𝗲𝗧𝗶𝗺𝗲
┃✫│ 𝗢𝗽𝗲𝗻𝗧𝗶𝗺𝗲
┃✬│ 𝗗𝗶𝘀𝗽-𝗼𝗳𝗳
┃✫│ 𝗗𝗶𝘀𝗽-1
┃✬│ 𝗗𝗶𝘀𝗽-7
┃✫│ 𝗗𝗶𝘀𝗽-90
┃✬│ 𝗜𝗰𝗼𝗻
┃✯│ 𝗚𝗰𝗽𝗿𝗼𝗳𝗶𝗹𝗲
┃✫│ 𝗦𝘂𝗯𝗷𝗲𝗰𝘁
┃✬│ 𝗗𝗲𝘀𝗰
┃✫│ 𝗟𝗲𝗮𝘃𝗲
┃✯│ 𝗔𝗱𝗱
┃✫│ 𝗧𝗮𝗴𝗮𝗹𝗹
┃✬│ 𝗛𝗶𝗱𝗲𝘁𝗮𝗴
┃✫│ 𝗥𝗲𝘃𝗼𝗸𝗲
┃✬│ 𝗠𝘂𝘁𝗲
┃✫│ 𝗨𝗻𝗺𝘂𝘁𝗲
╰══───────◇───────══╯
●═══ 〘 𝗖𝗢𝗗𝗜𝗡𝗚 〙 ═───═●
╭══───────◇───────══╮
┃✫│ 𝗖𝗮𝗿𝗯𝗼𝗻
┃✯│ 𝗖𝗼𝗺𝗽𝗶𝗹𝗲-𝗰
┃✫│ 𝗖𝗼𝗺𝗽𝗶𝗹𝗲-𝗰++
┃✯│ 𝗖𝗼𝗺𝗽𝗶𝗹𝗲-𝗷𝘀
┃✫│ 𝗖𝗼𝗺𝗽𝗶𝗹𝗲-𝗽𝘆
┃✫│ 𝗜𝗻𝘀𝗽𝗲𝗰𝘁
┃✯│ 𝗘𝗻𝗰𝗿𝘆𝗽𝘁𝗲
┃✫│ 𝗘𝘃𝗮𝗹
╰══───────◇───────══╯
●═══ 〘 𝗚𝗘𝗡𝗘𝗥𝗔𝗟 〙 ═───═●
╭══───────◇───────══╮
┃✬│ 𝗢𝘄𝗻𝗲𝗿
┃✬│ 𝗦𝗰𝗿𝗶𝗽𝘁
┃✫│ 𝗠𝗲𝗻𝘂
┃✬│ 𝗟𝗶𝘀𝘁
┃✫│ 𝗣𝗶𝗻𝗴
┃✯│ 𝗣𝗼𝗹𝗹
┃✬│ 𝗔𝗹𝗶𝘃𝗲
┃✫│ 𝗦𝗽𝗲𝗲𝗱
┃✬│ 𝗥𝗲𝗽𝗼
┃✫│ 𝗥𝘂𝗻𝘁𝗶𝗺𝗲
┃✯│ 𝗨𝗽𝘁𝗶𝗺𝗲
┃✫│ 𝗗𝗽
┃✯│ 𝗗𝗹𝘁
┃✬│ 𝗠𝗮𝗶𝗹
┃✫│ 𝗜𝗻𝗯𝗼𝘅
┃✯│ 𝗡𝗲𝘄𝘀
┃✫│ 𝗔𝗻𝗶𝗺𝗲
╰══───────◇───────══╯
●═══ 〘 𝗢𝗪𝗡𝗘𝗥 〙═───═●
╭══───────◇───────══╮
┃✬│ 𝗥𝗲𝘀𝘁𝗮𝗿𝘁
┃✫│ 𝗔𝗱𝗺𝗶𝗻
┃✯│ 𝗖𝗮𝘀𝘁
┃✬│ 𝗕𝗿𝗼𝗮𝗱𝗰𝗮𝘀𝘁
┃✫│ 𝗝𝗼𝗶𝗻
┃✯│ 𝗚𝗲𝘁𝘃𝗮𝗿
┃✯│ 𝗥𝗲𝗱𝗲𝗽𝗹𝗼𝘆
┃✯│ 𝗨𝗽𝗱𝗮𝘁𝗲
┃✫│ 𝗦𝗲𝘁𝘃𝗮𝗿
┃✬│ 𝗕𝗼𝘁𝗽𝗽
┃✫│ 𝗙𝘂𝗹𝗹𝗽𝗽
┃✬│ 𝗕𝗹𝗼𝗰𝗸
┃✫│ 𝗨𝗻𝗯𝗼𝗰𝗸
┃✬│ 𝗞𝗶𝗹𝗹
┃✫│ 𝗞𝗶𝗹𝗹2
┃✫│ 𝗦𝗮𝘃𝗲
┃✬│ >
╰══───────◇───────══╯
●═══ 〘 𝗣𝗥𝗔𝗡𝗞 〙 ═──═●
╭══───────◇───────══╮
┃✯│ 𝗛𝗮𝗰𝗸
╰══───────◇───────══╯
●═══ 〘 𝗟𝗢𝗚𝗢𝗦 〙 ═──═●
╭══───────◇───────══╮
┃✯│ 𝗛𝗮𝗰𝗸𝗲𝗿
┃✫│ 𝗛𝗮𝗰𝗸𝗲𝗿2
┃✯│ 𝗚𝗿𝗮𝗳𝗳𝗶𝘁𝗶
┃✫│ 𝗖𝗮𝘁
┃✯│ 𝗦𝗮𝗻𝗱
┃✫│ 𝗚𝗼𝗹𝗱
┃✯│ 𝗔𝗿𝗲𝗻𝗮
┃✫│ 𝗗𝗿𝗮𝗴𝗼𝗻𝗯𝗮𝗹𝗹
┃✯│ 𝗡𝗮𝗿𝘂𝘁𝗼
┃✫│ 𝗖𝗵𝗶𝗹𝗱
┃✯│ 𝗟𝗲𝗮𝘃𝗲𝘀
┃✫│ 1917
┃✯│ 𝗧𝘆𝗽𝗼𝗴𝗿𝗮𝗽𝗵𝘆
╰══───────◇───────══╯
●═══ 〘 𝗧𝗘𝗫𝗧𝗠𝗔𝗞𝗘𝗥 〙═──═●
╭══───────◇───────══╮
┃✯│ 𝗣𝘂𝗿𝗽𝗹𝗲
┃✫│ 𝗡𝗲𝗼𝗻
┃✯│ 𝗡𝗼𝗲𝗹
┃✫│ 𝗠𝗲𝘁𝗮𝗹𝗹𝗶𝗰
┃✯│ 𝗗𝗲𝘃𝗶𝗹
┃✫│ 𝗜𝗺𝗽𝗿𝗲𝘀𝘀𝗶𝘃𝗲
┃✯│ 𝗦𝗻𝗼𝘄
┃✫│ 𝗪𝗮𝘁𝗲𝗿
┃✯│ 𝗧𝗵𝘂𝗻𝗱𝗲𝗿
┃✫│ 𝗜𝗰𝗲
┃✯│ 𝗠𝗮𝘁𝗿𝗶𝘅
┃✫│ 𝗦𝗶𝗹𝘃𝗲𝗿
┃✯│ 𝗟𝗶𝗴𝗵𝘁
╰══───────◇───────══╯
●═══ 〘 𝗠𝗜𝗦𝗖 〙 ═──═●
╭══───────◇───────══╮
┃✫│ 𝗪𝗲𝗮𝘁𝗵𝗲𝗿
┃✯│ 𝗚𝗶𝘁𝗵𝘂𝗯
┃✫│ 𝗚𝗶𝘁𝗰𝗹𝗼𝗻𝗲
┃✯│ 𝗔𝗱𝘃𝗶𝗰𝗲
┃✫│ 𝗥𝗲𝗺𝗼𝘃𝗲𝗯𝗴
┃✯│ 𝗥𝗲𝗺𝗶𝗻𝗶
┃✯│ 𝗧𝘁𝘀
┃✯│ 𝗧𝗿𝘁
┃✫│ 𝗙𝗮𝗰𝘁
┃✯│ 𝗖𝗮𝘁𝗳𝗮𝗰𝘁
┃✫│ 𝗤𝘂𝗼𝘁𝗲𝘀
┃✯│ 𝗣𝗶𝗰𝗸𝘂𝗽𝗹𝗶𝗻𝗲
╰══───────◇───────══╯
●═══ 〘 𝗢𝗧𝗛𝗘𝗥𝗦 〙 ═──═●
╭══───────◇───────══╮
┃✫│ 𝗖𝗿𝗲𝗱𝗶𝘁𝘀
┃✬│ 𝗨𝗽𝗹𝗼𝗮𝗱
┃✫│ 𝗔𝘁𝘁𝗽
┃✬│ 𝗨𝗿𝗹
┃✫│ 𝗜𝗺𝗮𝗴𝗲
┃✬│ 𝗦𝘆𝘀𝘁𝗲𝗺
┃✫╰═───────◇───────═╯
┃ 𝗠𝗮𝗱𝗲 𝗢𝗻 𝗘𝗮𝗿𝘁𝗵 𝗕𝘆 𝗛𝘂𝗺𝗮𝗻𝘀 !
╰══────────────────══╯`;
if (menu === 'VIDEO') {
client.sendMessage(m.chat, {
video: fs.readFileSync('./Media/menu.mp4'),
caption: cap,
gifPlayback: true
}, {
quoted: m
})
} else if (menu === 'TEXT') {
client.sendMessage(from, { text: cap}, {quoted: m})
} else if (menu === 'IMAGE') {
client.sendMessage(m.chat, { image: { url: 'https://files.catbox.moe/duv8ac.jpg' }, caption: cap, fileLength: "9999999999"}, { quoted: m })
} else if (menu === 'LINK') {
client.sendMessage(m.chat, {
text: cap,
contextInfo: {
externalAdReply: {
showAdAttribution: true,
title: `𝗥𝗔𝗩𝗘𝗡-𝗕𝗢𝗧`,
body: `${runtime(process.uptime())}`,
thumbnail: fs.readFileSync('./Media/Raven.jpg'),
sourceUrl: 'https://wa.me/254114660061?text=Hello👋+Nick+Nihostie+Bot+Mkuu+😔',
mediaType: 1,
renderLargerThumbnail: true
}
}
}, {
quoted: m
})
}
break;
//========================================================================================================================//
//========================================================================================================================//
case "advice":
reply(advice());
console.log(advice());
break;
//========================================================================================================================//
case "owner":
client.sendContact(m.chat, Dev, m)
break;
//========================================================================================================================//
case "lyrics2":
try {
if (!text) return reply("Provide a song name!");
const searches = await Client.songs.search(text);
const firstSong = searches[0];
//await client.sendMessage(from, {text: firstSong});
const lyrics = await firstSong.lyrics();
await client.sendMessage(from, { text: lyrics}, { quoted: m });
} catch (error) {
reply(`I did not find any lyrics for ${text}. Try searching a different song.`);
console.log(error);
}
break;
//========================================================================================================================//
case "play2": {
const yts = require("yt-search");
try {
if (!text) return m.reply("What song do you want to download?");
const { videos } = await yts(text);
if (!videos || videos.length === 0) {
return m.reply("No songs found!");
}
const urlYt = videos[0].url;
try {
let data = await fetchJson(`https://api.dreaded.site/api/ytdl/audio?url=${urlYt}`);
const { title, format, url: audioUrl } = data.result;
await client.sendMessage(
m.chat,
{
document: { url: audioUrl },
mimetype: "audio/mpeg",
caption: "𝗗𝗢𝗪𝗡𝗟𝗢𝗔𝗗𝗘𝗗 𝗕𝗬 𝗥𝗔𝗩𝗘𝗡-𝗕𝗢𝗧",
fileName: `${title}.mp3`,
},
{ quoted: m }
);
} catch (error) {
console.error("API request failed:", error.message);
m.reply("Download failed: Unable to retrieve audio.");
}
} catch (error) {
m.reply("Download failed\n" + error.message);
}
};
break;
//========================================================================================================================//
case "song2": {
const yts = require("yt-search");
const fetch = require("node-fetch");
try {
if (!text) {
return m.reply("What song you want to download.");
}
let search = await yts(text);
if (!search.all.length) {
return reply("No results found for your query.");
}
let link = search.all[0].url;
const apiUrl = `https://keith-api.vercel.app/download/dlmp3?url=${link}`;
let response = await fetch(apiUrl);
let data = await response.json();
if (data.status && data.result) {
const audioData = {
title: data.result.title,
downloadUrl: data.result.downloadUrl,
thumbnail: search.all[0].thumbnail,
format: data.result.format,
quality: data.result.quality,
};
await client.sendMessage(
m.chat,
{
audio: { url: audioData.downloadUrl },
mimetype: "audio/mp4",
},
{ quoted: m }
);
return;
} else {
return reply("Unable to fetch the song. Please try again later.");
}
} catch (error) {
return reply(`An error occurred: `);
}
}
break;
//========================================================================================================================//
case 'video': {
const yts = require("yt-search");
const fetch = require("node-fetch");
try {
if (!text) {
return reply("What video you want to download?");
}
let search = await yts(text);
if (!search.all.length) {
return reply(client, 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 client.sendMessage(
m.chat,
{
video: { url: videoData.downloadUrl },
mimetype: "video/mp4",
caption: "𝗗𝗢𝗪𝗡𝗟𝗢𝗔𝗗𝗘𝗗 𝗕𝗬 𝗥𝗔𝗩𝗘𝗡-𝗕𝗢𝗧",
},
{ quoted: m }
);
return;
} else {
return reply("Unable to fetch the video. Please try again later.");
}
} catch (error) {
return reply(`An error occurred: ${error.message}`);
}
};
break;
//========================================================================================================================//
case "update": case "redeploy": {
const axios = require('axios');
if(!Owner) throw NotOwner;
if (!appname || !herokuapi) {
await m.reply("It looks like the Heroku app name or API key is not set. Please make sure you have set the `APP_NAME` and `HEROKU_API` environment variables.");
return;
}
async function redeployApp() {
try {
const response = await axios.post(
`https://api.heroku.com/apps/${appname}/builds`,
{
source_blob: {
url: "https://github.com/HunterNick2/RAVEN-BOT/tarball/main",
},
},
{
headers: {
Authorization: `Bearer ${herokuapi}`,
Accept: "application/vnd.heroku+json; version=3",
},
}
);
await m.reply("Your bot is undergoing a ruthless upgrade, hold tight for the next 2 minutes as the redeploy executes! Once done, you’ll have the freshest version of *RAVEN-BOT* unleashed upon you.");
console.log("Build details:", response.data);
} catch (error) {
const errorMessage = error.response?.data || error.message;
await m.reply(`Failed to update and redeploy. Please check if you have set the Heroku API key and Heroku app name correctly.`);
console.error("Error triggering redeploy:", errorMessage);
}
}
redeployApp();
}
break;
//========================================================================================================================//
case "credits":
client.sendMessage(m.chat, { image: { url: 'https://files.catbox.moe/duv8ac.jpg' }, caption: `We express sincere gratitude and acknowledgement to the following:\n\n -Dika Ardnt ➪ Indonesia\n - Writing the base code using case method\nhttps://github.com/DikaArdnt\n\n -Adiwajshing ➪ India\n - Writing and Coding the bot's library (baileys)\nhttps://github.com/WhiskeySockets/Baileys\n\n -WAWebSockets Discord Server community\n-Maintaining and reverse engineering the Web Sockets\nhttps://discord.gg/WeJM5FP9GG\n\n - Nick Hunter ➪ Kenya\n - Actively compiling and debugging parts of this bot script\nhttps://github.com/HunterNick2\n\n - Keithkeizzah (Ghost) ➪ Kenya\n - Compiling and debugging parts of this bot script\nhttps://github.com/Keithkeizzah\n\n - Fortunatus Mokaya ➪ Kenya\n - Founder of the bot Base\nhttps://github.com/Fortunatusmokaya\n\n𝗥𝗔𝗩𝗘𝗡-𝗕𝗢𝗧`}, { quoted: m});
break;
//========================================================================================================================//
case 'poll': {
let [poll, opt] = text.split("|")
if (text.split("|") < 2)
return m.reply(`Wrong format::\nExample:- poll who is the best president|Putin, Ruto`);
let options = []
for (let i of opt.split(',')) {
options.push(i)
}
await client.sendMessage(m.chat, {
poll: {
name: poll,
values: options
}
})
}
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 m.reply("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) {
m.reply("sorry but the API endpoint didn't respond correctly. Try again later.");
continue;
}
ffmpeg(response.data)
.toFormat("mp3")
.save(outputPath)
.on("end", async () => {
await client.sendMessage(
m.chat,
{
document: { url: outputPath },
mimetype: "audio/mp3",
caption: "𝗗𝗢𝗪𝗡𝗟𝗢𝗔𝗗𝗘𝗗 𝗕𝗬 𝗥𝗔𝗩𝗘𝗡-𝗕𝗢𝗧",
fileName: outputFileName,
},
{ quoted: m }
);
fs.unlinkSync(outputPath);
})
.on("error", (err) => {
m.reply("Download failed\n" + err.message);
});
return;
}
} catch (e) {
// Continue to the next API if one fails
continue;
}
}
m.reply("An error occurred. All APIs might be down or unable to process the request.");
} catch (error) {
m.reply("Download failed\n" + error.message);
}
}
break;
//========================================================================================================================//
case "inspect": {
const fetch = require('node-fetch');
const cheerio = require('cheerio');
if (!text) return m.reply("Provide a valid web link to fetch! The bot will crawl the website and fetch its HTML, CSS, JavaScript, and any media embedded in it.");
if (!/^https?:\/\//i.test(text)) {
return m.reply("Please provide a URL starting with http:// or https://");
}
try {
const response = await fetch(text);
const html = await response.text();
const $ = cheerio.load(html);
const mediaFiles = [];
$('img[src], video[src], audio[src]').each((i, element) => {
let src = $(element).attr('src');
if (src) {
mediaFiles.push(src);
}
});
const cssFiles = [];
$('link[rel="stylesheet"]').each((i, element) => {
let href = $(element).attr('href');
if (href) {
cssFiles.push(href);
}
});
const jsFiles = [];
$('script[src]').each((i, element) => {
let src = $(element).attr('src');
if (src) {
jsFiles.push(src);
}
});
await m.reply(`**Full HTML Content**:\n\n${html}`);
if (cssFiles.length > 0) {
for (const cssFile of cssFiles) {
const cssResponse = await fetch(new URL(cssFile, text));
const cssContent = await cssResponse.text();
await m.reply(`**CSS File Content**:\n\n${cssContent}`);
}
} else {
await m.reply("No external CSS files found.");
}
if (jsFiles.length > 0) {
for (const jsFile of jsFiles) {
const jsResponse = await fetch(new URL(jsFile, text));
const jsContent = await jsResponse.text();
await m.reply(`**JavaScript File Content**:\n\n${jsContent}`);
}
} else {
await m.reply("No external JavaScript files found.");
}
if (mediaFiles.length > 0) {
await m.reply(`**Media Files Found**:\n${mediaFiles.join('\n')}`);
} else {
await m.reply("No media files (images, videos, audios) found.");
}
} catch (error) {
console.error(error);
return m.reply("An error occurred while fetching the website content.");
}
}
break;