forked from Iam-badboy/jarvis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
3220 lines (3110 loc) · 402 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//A SPARROW CREATION
//npm
const qrcode = require('qrcode-terminal')
const moment = require('moment-timezone')
const fs = require('fs')
const got = require('got')
const axios = require('axios')
const crypto = require('crypto')
const delay = require('delay')
const brainly = require('brainly-scraper')
const ffmpeg = require('fluent-ffmpeg')
const FormData = require('form-data')
const imgbb = require('imgbb-uploader')
const toMs = require('ms')
const yts = require("yt-search");
const { EmojiAPI } = require("emoji-api");
const emoji = new EmojiAPI()
const gis = require('g-i-s')
const request = require('request')
const { ytplay, ytdldown } = require('./lib/ytdownload')
const fetch = require('node-fetch')
const util = require('util')
const imageToBase64 = require('image-to-base64')
const cd = 4.32e+7
const tik = require('tiktok-scraper-without-watermark')
const { spawn, exec, execSync } = require("child_process")
const qrcodes = require("qrcode")
const FileType = require('file-type')
const emojiUnicode = require('emoji-unicode')
const cheerio =require('cheerio')
const speed = require('performance-now')
const { removeBackgroundFromImageFile } = require('remove.bg')
const vapor = require('vapor-text')
const ms = require('parse-ms')
const path = require('path')
//lib
const { color, bgcolor } = require('./lib/color')
const { bahasa } = require('./lib/bahasa')
const { negara } = require('./lib/kodenegara')
const { cheat } = require('./lib/cheat')
const { allm } = require('./lib/allm')
const { mnu } = require('./lib/mnu')
const { funm } = require('./lib/funm')
const { tlsm } = require('./lib/tlsm')
const { ownm } = require('./lib/ownm')
const { dwm } = require('./lib/dwm')
const { grpm } = require('./lib/grpm')
const { yta, ytv } = require('./lib/ytdl')
const { scrpt } = require('./lib/scrpt')
const { animesaran } = require('./lib/animesaran')
const { animesaran2 } = require('./lib/animesaran2')
const { donasi } = require('./lib/donasi')
const { infown } = require('./lib/infown')
const RuriChan = JSON.parse(fs.readFileSync('./src/settings.json'))
const { fetchJson, getBase64, createExif } = require('./lib/fetcher')
const { recognize } = require('./lib/ocr')
const encodeUrl = require('encodeurl')
const { cmdadd } = require('./lib/totalcmd.js')
const { msgFilter } = require('./lib/antispam')
const { uploadimg } = require('./lib/uploadimg')
const { snk } = require('./lib/snk')
const fontPath = ('./lib/Zahraaa.ttf')
const { h2k, generateMessageID, getRandom, getBuffer, getGroupAdmins, start, info, success, close } = require('./lib/functions')
const Exif = require('./lib/exif')
const exif = new Exif()
const sleep = async (ms) => {
return new Promise(resolve => setTimeout(resolve, ms));
}
//plugins
const { convertSticker } = require('./plugins/swm.js')
//Beli yak
ZeksApi = 'apivinz',
LeysKey = 'MNQYOVSL',
apixteam = '7415bc4287ad5ca8',
apiKey = '7ed90d537ab5edddb6ba6465',
LolKey = 'ApikeyHarusBeli',
odckey = 'onlygay',
onlydev = 'onlygay',
xteam = 'AbilGanss',
BarBarKey = 'IDxO1TFYnKADlX4pxcHa'
AbilGanssVhtearKey = '1BlnApiIkyPake' // KALO ABIS BELI GBLG
xteamkey = 'AbilGanss' // KALO ABIS BELI GBLG
obzKey = 'Bidmzz1sJ2L1TKyqaMEU'
ApiDevolover = 'HokageBR' // KALO GKBISA BELI GBLG
TechApi = '5BNIDH-1T0kPj-gWqG6q-sHtuHA-AWBSgZ'
eksapi = 'apivinz'
shizukaapi = 'itsmeiky633'
apivhtear = '1BlnApiIkyPake' // KALO ABIS BELI GBLG
/*===================∆====================*/
//src/settings.json
memberlimit = RuriChan.memberlimit
aku = RuriChan.asu
tz = RuriChan.tzz
limitawal = RuriChan.limitawal
namabot = RuriChan.namabot
targetpc = RuriChan.targetnya
namaowner2 = RuriChan.namaown2
nomer2 = RuriChan.nomer2
imgibb = RuriChan.imgibb
namaowner = RuriChan.namaowner
fake = RuriChan.fake
NamaOwner = RuriChan.NamaOwnerrr
nomerowner = RuriChan.nomerlu
fakereplyhe = RuriChan.fakereplyhe
replynyaapa = RuriChan.replynyaapa
wait = RuriChan.wait
namo = RuriChan.nmaku
kelas = RuriChan.kelass
gender = RuriChan.genderr
agama = RuriChan.agamaa
asal = RuriChan.asall
umur = RuriChan.umurr
note = RuriChan.notee
Sayangggg = 'JARVIS'
//vcard
const vcard = 'BEGIN:VCARD\n'
+ 'VERSION:3.0\n'
+ 'FN:' + namaowner + 'ツ\n'
+ 'ORG: Owner' + namabot + ';\n'
+ 'TEL;type=CELL;type=VOICE;waid=' + 919947291867 + ':+' + 919947291867 + '\n'//Add your number here
+ 'END:VCARD' //
const tulo = 'BEGIN:VCARD\n'
+ 'VERSION:3.0\n'
+ 'FN:RURIBOTZツ\n'
+ 'ORG:OwnerRURI;\n'
+ 'TEL;type=CELL;type=VOICE;waid=919947291867:+919947291867\n'//Add your number here
+ 'END:VCARD'
//ini biarin aja
a = RuriChan.abc
battre = '89'
blocked = []
banChats = true
offline = false
hitt = []
simple = false
public = false
const ownerNumber = [`${nomerowner}@s.whatsapp.net`,`${nomer2}@s.whatsapp.net`]
//json file
const antitelegram = JSON.parse(fs.readFileSync('./database/group/antitelegram.json'))
const antilinkig = JSON.parse(fs.readFileSync('./database/group/antilinkig.json'))
const antilinkfb = JSON.parse(fs.readFileSync('./database/group/antilinkfb.json'))
const antilinkytv = JSON.parse(fs.readFileSync('./database/group/antilinkyt.json'))
const antilinkytc = JSON.parse(fs.readFileSync('./database/group/antilinkytchannel.json'))
const _leveling = JSON.parse(fs.readFileSync('./database/leveling.json'))
const _level = JSON.parse(fs.readFileSync('./database/level.json'))
const welkom = JSON.parse(fs.readFileSync('./database/welkom.json'))
const afk = JSON.parse(fs.readFileSync('./database/afk.json'))
const balance = JSON.parse(fs.readFileSync('./database/balance.json'))
const nsfw = JSON.parse(fs.readFileSync('./database/nsfw.json'))
const antgdpaa = JSON.parse(fs.readFileSync('./database/tagmell.json'))
const ban = JSON.parse(fs.readFileSync('./database/banned.json'))
const user = JSON.parse(fs.readFileSync('./database/user.json'))
const antijawa = JSON.parse(fs.readFileSync('./database/antijawa.json'))
const antibocil = JSON.parse(fs.readFileSync('./database/antibocil.json'))
const antiwibu = JSON.parse(fs.readFileSync('./database/antiwibu.json'))
const audionye = JSON.parse(fs.readFileSync('./database/audio.json'))
const samih = JSON.parse(fs.readFileSync('./database/simi.json'))
const event = JSON.parse(fs.readFileSync('./database/event.json'))
const antigay = JSON.parse(fs.readFileSync('./database/antigay.json'))
prem = JSON.parse(fs.readFileSync('./database/prem.json'))
const _limit = JSON.parse(fs.readFileSync('./database/limit.json'))
const uang = JSON.parse(fs.readFileSync('./database/uang.json'))
const adm = JSON.parse(fs.readFileSync('./database/admin.json'))
const antilink = JSON.parse(fs.readFileSync('./database/antilink.json'))
const antivirtex = JSON.parse(fs.readFileSync('./database/antivirtex.json'))
const bad = JSON.parse(fs.readFileSync('./database/bad.json'))
const iron = JSON.parse(fs.readFileSync('./database/iron.json'))
const badword = JSON.parse(fs.readFileSync('./database/badword.json'))
const pepolu = JSON.parse(fs.readFileSync('./database/totalcmd.json'))[0].totalcmd
//wa connect
const {
WAConnection,
MessageType,
Presence,
MessageOptions,
Mimetype,
WALocationMessage,
WA_MESSAGE_STUB_TYPES,
ReconnectMode,
ProxyAgent,
GroupSettingChange,
waChatKey,
mentionedJid,
processTime,
processTicksAndRejections,
ECONNABORTED,
apikey,
WA_DEAFULT_EPHEMERAL,
DataView,
TypedArray,
device,
Browser
} = require('@adiwajshing/baileys')
//simih
const simih = async (text) => {
try {
const sami = await fetch(`https://api.lolhuman.xyz/api/simi?apikey=${LolKey}&text=${text}`, {method: 'GET'})
const res = await sami.json()
return res.result
} catch {
return 'sɪᴍɪʟᴀʀ ᴏʀ ᴡʜᴀᴛ ᴛᴏ sᴀʏ'
}
}
const getLevelingXp = (sender) => {
let position = false
Object.keys(_level).forEach((i) => {
if (_level[i].id === sender) {
position = i
}
})
if (position !== false) {
return _level[position].xp
}
}
const jadiUser = (userid, sender, age, time, serials) => {
const obj = { id: userid, name: sender, age: age, time: time, serial: serials }
user.push(obj)
fs.writeFileSync('./database/user.json', JSON.stringify(user))
}
const bikinSerial = (size) => {
return crypto.randomBytes(size).toString('hex').slice(0, size)
}
const getLevelingLevel = (sender) => {
let position = false
Object.keys(_level).forEach((i) => {
if (_level[i].id === sender) {
position = i
}
})
if (position !== false) {
return _level[position].level
}
}
const getLevelingId = (sender) => {
let position = false
Object.keys(_level).forEach((i) => {
if (_level[i].id === sender) {
position = i
}
})
if (position !== false) {
return _level[position].id
}
}
const addLevelingXp = (sender, amount) => {
let position = false
Object.keys(_level).forEach((i) => {
if (_level[i].id === sender) {
position = i
}
})
if (position !== false) {
_level[position].xp += amount
fs.writeFileSync('./database/level.json', JSON.stringify(_level))
}
}
const addLevelingLevel = (sender, amount) => {
let position = false
Object.keys(_level).forEach((i) => {
if (_level[i].id === sender) {
position = i
}
})
if (position !== false) {
_level[position].level += amount
fs.writeFileSync('./database/level.json', JSON.stringify(_level))
}
}
const addLevelingId = (sender) => {
const obj = {id: sender, xp: 1, level: 1}
_level.push(obj)
fs.writeFileSync('./database/level.json', JSON.stringify(_level))
}
const getLimit = (sender) => {
let position = false
Object.keys(limit).forEach ((i) => {
if (limit[position].id === sender) {
position = i
}
})
if (position !== false) {
return limit[position].limit
}
}
const addATM = (sender) => {
const obj = {id: sender, uang : 0}
uang.push(obj)
fs.writeFileSync('./database/uang.json', JSON.stringify(uang))
}
const addKoinUser = (sender, amount) => {
let position = false
Object.keys(uang).forEach((i) => {
if (uang[i].id === sender) {
position = i
}
})
if (position !== false) {
uang[position].uang += amount
fs.writeFileSync('./database/uang.json', JSON.stringify(uang))
}
}
const checkATMuser = (sender) => {
let position = false
Object.keys(uang).forEach((i) => {
if (uang[i].id === sender) {
position = i
}
})
if (position !== false) {
return uang[position].uang
}
}
const bayarLimit = (sender, amount) => {
let position = false
Object.keys(_limit).forEach((i) => {
if (_limit[i].id === sender) {
position = i
}
})
if (position !== false) {
_limit[position].limit -= amount
fs.writeFileSync('./database/limit.json', JSON.stringify(_limit))
}
}
const confirmATM = (sender, amount) => {
let position = false
Object.keys(uang).forEach((i) => {
if (uang[i].id === sender) {
position = i
}
})
if (position !== false) {
uang[position].uang -= amount
fs.writeFileSync('./database/uang.json', JSON.stringify(uang))
}
}
const limitAdd = (sender) => {
let position = false
Object.keys(_limit).forEach((i) => {
if (_limit[i].id == sender) {
position = i
}
})
if (position !== false) {
_limit[position].limit += 1
fs.writeFileSync('./database/limit.json', JSON.stringify(_limit))
}
}
function kyun(seconds){
function pad(s){
return (s < 10 ? '0' : '') + s;
}
var hours = Math.floor(seconds / (60*60));
var minutes = Math.floor(seconds % (60*60) / 60);
var seconds = Math.floor(seconds % 60);
return `${pad(hours)} Hour ${pad(minutes)} Minutes ${pad(seconds)} Seconds`
}
async function starts() {
const Ruri = new WAConnection()
//WWEB
Ruri.version = [2, 2119, 6]
Ruri.logger.level = 'warn'
Ruri.on('qr', qr => {
qrcode.generate(qr, { small: true })
console.log(color('(+)','white'), color('JARVIS','red'), color('(+)','white'), color(' SQAN THE CODE','aqua'), color('JARVISOFC','yellow'))
})
Ruri.on('credentials-updated', () => {
fs.writeFileSync('./ruribot.json', JSON.stringify(Ruri.base64EncodedAuthInfo(), null, '\t'))
info('2', 'info!')
})
fs.existsSync('./ruribot.json') && Ruri.loadAuthInfo('./ruribot.json')
Ruri.on('connecting', () => {
start('2', color('[ ! ]Loading....','aqua'))
})
Ruri.on('open', () => {
success('2', color('[ ! ]connected\n','red'), color('SCRIPT BY SPARROW','yellow'))
})
Ruri.connect({timeoutMs: 30*1000})
Ruri.on('group-participants-update', async (anu) => {
if (!welkom.includes(anu.jid)) return
try {
const mdata = await Ruri.groupMetadata(anu.jid)
num = anu.participants[0]
console.log(anu)
ini_user = Ruri.contacts[num]
namaewa = ini_user.notify
member = mdata.participants.length
try {
var ppimg = await Ruri.getProfilePicture(`${anu.participants[0].split('@')[0]}@c.us`)
} catch {
var ppimg = 'https://i0.wp.com/www.gambarunik.id/wp-content/uploads/2019/06/Top-Gambar-Foto-Profil-Kosong-Lucu-Tergokil-.jpg'
}
try {
var ppgc = await Ruri.getProfilePicture(anu.jid)
} catch {
var ppgc = 'https://i0.wp.com/www.gambarunik.id/wp-content/uploads/2019/06/Top-Gambar-Foto-Profil-Kosong-Lucu-Tergokil-.jpg'
}
shortpc = await axios.get(`https://tinyurl.com/api-create.php?url=${ppimg}`)
shortgc = await axios.get(`https://tinyurl.com/api-create.php?url=${ppgc}`)
if (anu.action == 'add') {
let img = await getBuffer(ppimg)
teks = `┌───〔 *_𝙹𝙰𝚁𝚅𝙸𝚂_* 〕\n┊\n└───────────𔒝\n┌───〔 ᴡᴇʟᴄᴏᴍᴇ 〕\n┊ʜᴇʏ ${namaewa}\n┊ᴡᴇʟᴄᴏᴍᴇ ᴛᴏ ᴛʜᴇ ɢʀᴏᴜᴘ:\n┊${mdata.subject}\n┊ɴᴜᴍʙᴇʀ: @${num.split('@')[0]}\n┊ʜᴏᴘᴇғᴜʟʟʏ ғᴇᴇʟ ᴀᴛ ʜᴏᴍᴇ\n└───────────𔒝`
Ruri.sendMessage(mdata.id, img, MessageType.image, {caption: teks, contextInfo: {'mentionedJid': [num]} })
} else if (anu.action == 'promote') {
let img = await getBuffer(ppimg)
teks = `┌───〔 *_𝙹𝙰𝚁𝚅𝙸𝚂_* 〕\n┊\n└───────────𔒝\n┌───〔 ᴘʀᴏᴍᴏᴛᴇᴅ 〕\n┊ᴘʀᴏᴍᴏᴛᴇ ᴅᴇᴛᴇᴄᴛᴇᴅ\n┊\n┊ɴᴜᴍʙᴇʀ: ${num.replace('@s.whatsapp.net', '')}\n┊ᴄᴏɴɢʀᴀᴛᴜʟᴀᴛɪᴏɴs ʏᴏᴜ ʙᴇᴄᴏᴍᴇ ᴀ ɢʀᴏᴜᴘ ᴀᴅᴍɪɴ!\n┊@${num.split('@')[0]}\n└───────────𔒝`
Ruri.sendMessage(mdata.id, img, MessageType.image, {caption: teks, contextInfo: {'mentionedJid': [num]}})
} else if (anu.action == 'demote') {
let img = await getBuffer(ppimg)
teks = `┌───〔 *_𝙹𝙰𝚁𝚅𝙸𝚂_* 〕\n┊\n└───────────𔒝\n┌───〔 ᴅᴇᴍᴏᴛᴇᴅ 〕\n┊ᴅᴇᴍᴏᴛᴇ ᴅᴇᴛᴇᴄᴛᴇᴅ\n┊\n┊ɴᴜᴍʙᴇʀ: ${num.replace('@s.whatsapp.net', '')}\n┊ʏᴏᴜ ᴀʀᴇ ɴᴏ ʟᴏɴɢᴇʀ ᴀɴ ᴀᴅᴍɪɴ\n┊@${num.split('@')[0]}\n└───────────𔒝`
Ruri.sendMessage(mdata.id, img, MessageType.image, {caption: teks, contextInfo: {'mentionedJid': [num]}})
}
} catch (e) {
console.log('Error : %s', color(e, 'red'))
}
})
Ruri.on('CB:Blocklist', json => {
if (blocked.length > 2) return
for (let i of json[1].blocklist) {
blocked.push(i.replace('c.us','s.whatsapp.net'))
}
})
Ruri.on('CB:action,,battery', json => {
const batteryLevelStr = json[2][0][1].value
const batterylevel = parseInt (batteryLevelStr)
battre = batterylevel
})
//end
Ruri.on('CB:action,,call', async json => {
const callerId = json[2][0][1].from;
console.log("call dari "+ callerId)
Ruri.sendMessage(callerId, "Telpon = Block Tq..\n", MessageType.text)
await sleep(4000)
await Ruri.blockUser(callerId, "add") // Block user
})
var date = new Date();
var tahun = date.getFullYear();
var bulan1 = date.getMonth();
var tanggal = date.getDate();
var hari = date.getDay();
var jams = date.getHours();
var menit = date.getMinutes();
var detik = date.getSeconds();
var waktoo = date.getHours();
switch(hari) {
case 0: hari = 'sᴜɴᴅᴀʏ'; break;
case 1: hari = 'ᴍᴏɴᴅᴀʏ'; break;
case 2: hari = 'ᴛᴜᴇsᴅᴀʏ'; break;
case 3: hari = 'ᴡᴇᴅɴᴇsᴅᴀʏ'; break;
case 4: hari = 'ᴛʜᴜʀsᴅᴀʏ'; break;
case 5: hari = 'ғʀɪᴅᴀʏ'; break;
case 6: hari = 'sᴀᴛᴜʀᴅᴀʏ'; break;
}
switch(bulan1) {
case 0: bulan1 = 'ᴊᴀɴᴜᴀʀʏ'; break;
case 1: bulan1 = 'ғᴇʙʀᴜᴀʀʏ'; break;
case 2: bulan1 = 'ᴍᴀʀᴄʜ'; break;
case 3: bulan1 = 'ᴀᴘʀɪʟ'; break;
case 4: bulan1 = 'ᴍᴀʏ'; break;
case 5: bulan1 = 'ᴊᴜɴᴇ'; break;
case 6: bulan1 = 'ᴊᴜʟʏ'; break;
case 7: bulan1 = 'ᴀᴜɢᴜsᴛ'; break;
case 8: bulan1 = 'sᴇᴘᴛᴇᴍʙᴇʀ'; break;
case 9: bulan1 = 'ᴏᴄᴛᴏʙᴇʀ'; break;
case 10: bulan1 = 'ɴᴏᴠᴇᴍʙᴇʀ'; break;
case 11: bulan1 = 'ᴅᴇᴄᴇᴍʙᴇʀ'; break;
}
switch(jams){
case 0: pada = "ɴɪɢʜᴛ"; break;
case 1: pada = "ɴɪɢʜᴛ"; break;
case 2: pada = "ɴɪɢʜᴛ"; break;
case 3: pada = "ᴍᴏʀɴɪɴɢ"; break;
case 4: pada = "ᴍᴏʀɴɪɴɢ"; break;
case 5: pada = "ᴍᴏʀɴɪɴɢ"; break;
case 6: pada = "ᴍᴏʀɴɪɴɢ"; break;
case 7: pada = "ᴍᴏʀɴɪɴɢ"; break;
case 8: pada = "ᴍᴏʀɴɪɴɢ"; break;
case 9: pada = "ᴍᴏʀɴɪɴɢ"; break;
case 10: pada = "ᴍᴏʀɴɪɴɢ"; break;
case 11: pada = "ᴍᴏʀɴɪɴɢ"; break;
case 12: pada = "ᴀғᴛᴇʀɴᴏᴏɴ"; break;
case 13: pada = "ᴀғᴛᴇʀɴᴏᴏɴ"; break;
case 14: pada = "ᴀғᴛᴇʀɴᴏᴏɴ"; break;
case 15: pada = "ᴀғᴛᴇʀɴᴏᴏɴ"; break;
case 16: pada = "ᴀғᴛᴇʀɴᴏᴏɴ"; break;
case 17: pada = "ᴀғᴛᴇʀɴᴏᴏɴ"; break;
case 18: pada = "ᴀғᴛᴇʀɴᴏᴏɴ"; break;
case 19: pada = "ᴀғᴛᴇʀɴᴏᴏɴ"; break;
case 20: pada = "ɴɪɢʜᴛ"; break;
case 21: pada = "ɴɪɢʜᴛ"; break;
case 22: pada = "ɴɪɢʜᴛ"; break;
case 23: pada = "ɴɪɢʜᴛ"; break;
}
var tampilHari = '' + hari + ', ' + tanggal + ' ' + bulan1 + ' ' + tahun;
var tampilJam = '' + 'Jams : ' + jams + ':' + menit + ':' + detik + ' Wib';
tampilTanggal = hari + " "+ tanggal + " " + bulan1 + " " + tahun;
tampilWaktu = jams + ":" + menit + ":" + detik;
Ruri.on('message-update', async (Mel) => {
try {
const from = Mel.key.remoteJid
const messageStubType = WA_MESSAGE_STUB_TYPES[Mel.messageStubType] || 'MESSAGE'
const dataRevoke = JSON.parse(fs.readFileSync('./src/gc-revoked.json'))
const dataCtRevoke = JSON.parse(fs.readFileSync('./src/ct-revoked.json'))
const dataBanCtRevoke = JSON.parse(fs.readFileSync('./src/ct-revoked-banlist.json'))
const sender = Mel.key.fromMe ? Ruri.user.jid : Mel.key.remoteJid.endsWith('@g.us') ? Mel.participant : Mel.key.remoteJid
const isRevoke = Mel.key.remoteJid.endsWith('@s.whatsapp.net') ? true : Mel.key.remoteJid.endsWith('@g.us') ? dataRevoke.includes(from) : false
const isCtRevoke = Mel.key.remoteJid.endsWith('@g.us') ? true : dataCtRevoke.data ? true : false
const isBanCtRevoke = Mel.key.remoteJid.endsWith('@g.us') ? true : !dataBanCtRevoke.includes(sender) ? true : false
if (messageStubType == 'REVOKE') {
console.log(`Status untuk grup : ${!isRevoke}\nStatus semua kontak : ${!isCtRevoke}\nStatus kontak dikecualikan : ${!isBanCtRevoke}`)
if (!isRevoke) return
if (!isCtRevoke) return
if (!isBanCtRevoke) return
const from = Mel.key.remoteJid
const isGroup = Mel.key.remoteJid.endsWith('@g.us') ? true : false
let int
let infoMSG = JSON.parse(fs.readFileSync('./src/msg.data.json'))
const id_deleted = Mel.key.id
const conts = Mel.key.fromMe ? Ruri.user.jid : Ruri.contacts[sender] || { notify: jid.replace(/@.+/, '') }
const pushname = Mel.key.fromMe ? Ruri.user.name : conts.notify || conts.vname || conts.name || '-'
const opt4tag = {
contextInfo: { mentionedJid: [sender] }
}
for (let i = 0; i < infoMSG.length; i++) {
if (infoMSG[i].key.id == id_deleted) {
const dataInfo = infoMSG[i]
const type = Object.keys(infoMSG[i].message)[0]
const timestamp = infoMSG[i].messageTimestamp
int = {
no: i,
type: type,
timestamp: timestamp,
data: dataInfo
}
}
}
const index = Number(int.no)
const body = int.type == 'conversation' ? infoMSG[index].message.conversation : int.type == 'extendedTextMessage' ? infoMSG[index].message.extendedTextMessage.text : int.type == 'imageMessage' ? infoMSG[index].message.imageMessage.caption : int.type == 'stickerMessage' ? 'Sticker' : int.type == 'audioMessage' ? 'Audio' : int.type == 'videoMessage' ? infoMSG[index].videoMessage.caption : infoMSG[index]
const mediaData = int.type === 'extendedTextMessage' ? JSON.parse(JSON.stringify(int.data).replace('quotedM', 'm')).message.extendedTextMessage.contextInfo : int.data
var itsme = `0@s.whatsapp.net`
var split = `${fake}`
var selepbot72 = {
contextInfo: {
participant: itsme,
quotedMessage: {
extendedTextMessage: {
text: split,
}
}
}
}
if (int.type == 'conversation' || int.type == 'extendedTextMessage') {
const strConversation = ` 「 ANTI-DELETE 」
- Name : ${pushname}
- Number : ${sender.replace('@s.whatsapp.net', '')}
- Type : Text
- Time : ${moment.unix(int.timestamp).format('HH:mm:ss')}
- Date : ${moment.unix(int.timestamp).format('DD/MM/YYYY')}
- Message : ${body ? body : '-'}`
Ruri.sendMessage(from, strConversation, MessageType.text, selepbot72)
} else if (int.type == 'stickerMessage') {
var itsme = `0@s.whatsapp.net`
var split = `${fake}`
const pingbro23 = {
contextInfo: {
participant: itsme,
quotedMessage: {
extendedTextMessage: {
text: split,
}
}
}
}
const filename = `${sender.replace('@s.whatsapp.net', '')}-${moment().unix()}`
const savedFilename = await Ruri.downloadAndSaveMediaMessage(int.data, `./media/sticker/${filename}`)
const strConversation = ` 「 ANTI-DELETE 」
- ɴᴀᴍᴇ : ${pushname}
- ɴᴜᴍʙᴇʀ : ${sender.replace('@s.whatsapp.net', '')}
- ᴛʏᴘᴇ : Sticker
- ᴛɪᴍᴇ : ${moment.unix(int.timestamp).format('HH:mm:ss')}
- ᴅᴀᴛᴇ : ${moment.unix(int.timestamp).format('DD/MM/YYYY')}`
const buff = fs.readFileSync(savedFilename)
Ruri.sendMessage(from, strConversation, MessageType.text, opt4tag)
Ruri.sendMessage(from, buff, MessageType.sticker, pingbro23)
fs.unlinkSync(savedFilename)
} else if (int.type == 'imageMessage') {
var itsme = `0@s.whatsapp.net`
var split = `${fake}`
const pingbro22 = {
contextInfo: {
participant: itsme,
quotedMessage: {
extendedTextMessage: {
text: split,
}
}
}
}
const filename = `${sender.replace('@s.whatsapp.net', '')}-${moment().unix()}`
const savedFilename = await Ruri.downloadAndSaveMediaMessage(int.data, `./media/revoke/${filename}`)
const buff = fs.readFileSync(savedFilename)
const strConversation = ` 「 ANTI-DELETE 」
- ɴᴀᴍᴇ : ${pushname}
- ɴᴜᴍʙᴇʀ : ${sender.replace('@s.whatsapp.net', '')}
- ᴛʏᴘᴇ : Image
- ᴛɪᴍᴇ : ${moment.unix(int.timestamp).format('HH:mm:ss')}
- ᴅᴀᴛᴇ : ${moment.unix(int.timestamp).format('DD/MM/YYYY')}
- ᴍᴇssᴀɢᴇ : ${body ? body : '-'}\`\`\``
Ruri.sendMessage(from, buff, MessageType.image, { contextInfo: { mentionedJid: [sender] }, caption: strConversation })
fs.unlinkSync(savedFilename)
}
}
} catch (e) {
console.log('Message : %s', color(e, 'green'))
}
})
Ruri.on('message-new', async (Mel) => {
try {
let infoMSG = JSON.parse(fs.readFileSync('./src/msg.data.json'))
infoMSG.push(JSON.parse(JSON.stringify(Mel)))
fs.writeFileSync('./src/msg.data.json', JSON.stringify(infoMSG, null, 2))
const urutan_pesan = infoMSG.length
if (urutan_pesan === 5000) {
infoMSG.splice(0, 4300)
fs.writeFileSync('./src/msg.data.json', JSON.stringify(infoMSG, null, 2))
}
global.prefix
global.blocked
Mel.message = (Object.keys(Mel.message)[0] === 'ephemeralMessage') ?
Mel.message.ephemeralMessage.message : Mel.message
const from = Mel.key.remoteJid
const content = JSON.stringify(Mel.message)
const type = Object.keys(Mel.message)[0]
const { text, extendedText, contact, location, liveLocation, image, video, sticker, document, audio, product } = MessageType
var pes = (type === 'conversation' && Mel.message.conversation) ? Mel.message.conversation : (type == 'imageMessage') && Mel.message.imageMessage.caption ? Mel.message.imageMessage.caption : (type == 'videoMessage') && Mel.message.videoMessage.caption ? Mel.message.videoMessage.caption : (type == 'extendedTextMessage') && Mel.message.extendedTextMessage.text ? Mel.message.extendedTextMessage.text : ''
const messagesC = pes.slice(0).trim().split(/ +/).shift().toLowerCase()
var Link = (type === 'conversation' && Mel.message.conversation) ? Mel.message.conversation : (type == 'imageMessage') && Mel.message.imageMessage.caption ? Mel.message.imageMessage.caption : (type == 'videoMessage') && Mel.message.videoMessage.caption ? Mel.message.videoMessage.caption : (type == 'extendedTextMessage') && Mel.message.extendedTextMessage.text ? Mel.message.extendedTextMessage.text : ''
const messagesLink = Link.slice(0).trim().split(/ +/).shift().toLowerCase()
var tas = (type === 'conversation' && Mel.message.conversation) ? Mel.message.conversation : (type == 'imageMessage') && Mel.message.imageMessage.caption ? Mel.message.imageMessage.caption : (type == 'videoMessage') && Mel.message.videoMessage.caption ? Mel.message.videoMessage.caption : (type == 'extendedTextMessage') && Mel.message.extendedTextMessage.text ? Mel.message.extendedTextMessage.text : ''
const mesejAnti = tas.slice(0).trim().split(/ +/).shift().toLowerCase()
const RAM = `${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}MB / ${Math.round(require('os').totalmem / 1024 / 1024)}MB`
const mentionUser = type == "extendedTextMessage" ? Mel.message.extendedTextMessage.contextInfo.mentionedJid || [] : []
mentionByReply = type == "extendedTextMessage" ? Mel.message.extendedTextMessage.contextInfo.participant || "" : ""
mentionUser.push(mentionByReply)
const cmd = (type === 'conversation' && Mel.message.conversation) ? Mel.message.conversation : (type == 'imageMessage') && Mel.message.imageMessage.caption ? Mel.message.imageMessage.caption : (type == 'videoMessage') && Mel.message.videoMessage.caption ? Mel.message.videoMessage.caption : (type == 'extendedTextMessage') && Mel.message.extendedTextMessage.text ? Mel.message.extendedTextMessage.text : ''.slice(1).trim().split(/ +/).shift().toLowerCase()
const prefix = /^[!]/.test(cmd) ? cmd.match(/^[°•π÷׶∆£¢€¥®™✓=|~zZ+×!#$,|`÷?;:%abcdefghijklmnopqrstuvwxyz%^&./\\©^]/gi) : '-'
body = (type === 'conversation' && Mel.message.conversation.startsWith(prefix)) ? Mel.message.conversation : (type == 'imageMessage') && Mel.message.imageMessage.caption.startsWith(prefix) ? Mel.message.imageMessage.caption : (type == 'videoMessage') && Mel.message.videoMessage.caption.startsWith(prefix) ? Mel.message.videoMessage.caption : (type == 'extendedTextMessage') && Mel.message.extendedTextMessage.text.startsWith(prefix) ? Mel.message.extendedTextMessage.text : ''
budy = (type === 'conversation') ? Mel.message.conversation : (type === 'extendedTextMessage') ? Mel.message.extendedTextMessage.text : ''
const command = body.replace(prefix, '').trim().split(/ +/).shift().toLowerCase()
const args = body.trim().split(/ +/).slice(1)
const isCmd = body.startsWith(prefix)
const tescuk = ['0@s.whatsapp.net']
const isGroup = from.endsWith('@g.us')
const botNumber = Ruri.user.jid
const sender = isGroup ? Mel.participant : Mel.key.remoteJid
const getLevel = getLevelingLevel(sender)
const conts = Mel.key.fromMe ? Ruri.user.jid : Ruri.contacts[sender] || { notify: jid.replace(/@.+/, '') }
const pushname = Mel.key.fromMe ? Ruri.user.name : conts.notify || conts.vname || conts.name || '-'
//aml
aml = {
succes: `〔 sᴜᴄᴄᴇssғᴜʟ 〕𔒝`,
error: `〔 ᴇʀʀᴏʀ 〕𔒝`,
premium: `〔 ᴛʜɪs ᴄᴏᴍᴍᴀɴᴅ ɪs sᴘᴇᴄɪғɪᴄᴀʟʟʏ ғᴏʀ ᴘʀᴇᴍɪᴜᴍ ᴍᴇᴍʙᴇʀs 〕𔒝`,
lvlon: `〔 sᴜᴄᴄᴇssғᴜʟʟʏ ᴀᴄᴛɪᴠᴀᴛᴇᴅ ʟᴇᴠᴇʟɪɴɢ ᴍᴏᴅᴇ ɪɴ ᴛʜɪs ɢʀᴏᴜᴘ 〕𔒝`,
lvloff: `〔 sᴜᴄᴄᴇssғᴜʟʟʏ ᴅɪsᴀʙʟᴇᴅ ʟᴇᴠᴇʟɪɴɢ ᴍᴏᴅᴇ ɪɴ ᴛʜɪs ɢʀᴏᴜᴘ 〕𔒝`,
lvlnul: `〔 ʏᴏᴜʀ ʟᴇᴠᴇʟ ɪs sᴛɪʟʟ ᴇᴍᴘᴛʏ 〕𔒝`,
baned: `〔 sᴏʀʀʏ ʏᴏᴜ ʜᴀᴠᴇ ʙᴇᴇɴ ʙᴀɴɴᴇᴅ 〕𔒝`,
Iv: `〔 ᴇʀʀᴏʀ ʟɪɴᴋ 〕𔒝`,
lvlnoon: `〔 ʟᴇᴠᴇʟɪɴɢ ɪɴ ᴛʜᴇ ɢʀᴏᴜᴘ ʜᴀs ɴᴏᴛ ʙᴇᴇɴ ᴀᴄᴛɪᴠᴀᴛᴇᴅ 〕𔒝`,
noregis: `〔 ʏᴏᴜ ᴀʀᴇ ɴᴏᴛ ʀᴇɢɪsᴛᴇʀᴇᴅ\nᴛʏᴘᴇ @ᴠᴇʀɪғʏ ᴛᴏ ʀᴇɢɪsᴛᴇʀ 〕𔒝`,
rediregis: `〔 ʏᴏᴜ ʜᴀᴠᴇ ʀᴇɢɪsᴛᴇʀᴇᴅ ɪɴ ᴛʜᴇ ᴅᴀᴛᴀʙᴀsᴇ 〕𔒝`,
stikga: `〔 ᴡᴇʟʟ ғᴀɪʟᴇᴅ ᴛᴏ ʀᴇᴘᴇᴀᴛ ᴀ ғᴇᴡ ᴍᴏʀᴇ ᴍᴏᴍᴇɴᴛs 〕??`,
linkga: `〔 ɪɴᴠᴀʟɪᴅ ʟɪɴᴋ 〕𔒝`,
groupo: `〔 ᴛʜɪs ᴄᴏᴍᴍᴀɴᴅ ɪs sᴘᴇᴄɪғɪᴄᴀʟʟʏ ғᴏʀ ɢʀᴏᴜᴘs 〕𔒝`,
ownerb: `〔 ᴛʜɪs ᴄᴏᴍᴍᴀɴᴅ ɪs sᴘᴇᴄɪғɪᴄᴀʟʟʏ ғᴏʀ ᴛʜᴇ ᴏᴡɴᴇʀ 〕𔒝`,
ownerg: `〔 ᴛʜɪs ᴄᴏᴍᴍᴀɴᴅ ɪs sᴘᴇᴄɪғɪᴄᴀʟʟʏ ғᴏʀ ᴛʜᴇ ɢʀᴏᴜᴘ ᴏᴡɴᴇʀ 〕𔒝`,
admin: `〔 ᴛʜɪs ᴄᴏᴍᴍᴀɴᴅ ᴄᴀɴ ᴏɴʟʏ ʙᴇ ᴜsᴇᴅ ʙʏ ᴀɴ ᴀᴅᴍɪɴ 〕𔒝`,
badmin: `〔 ʙᴏᴛ ᴍᴜsᴛ ʙᴇ ᴀɴ ᴀᴅᴍɪɴ 〕𔒝`,
nsfwoff: `〔 ɴsғᴡ ᴍᴏᴅᴇ ᴀᴄᴛɪᴠᴀᴛᴇᴅ! 〕𔒝`,
bug: `〔 ᴛʜᴇ ᴘʀᴏʙʟᴇᴍ ʜᴀs ʙᴇᴇɴ ʀᴇᴘᴏʀᴛᴇᴅ ᴛᴏ ᴛʜᴇ ᴏᴡɴᴇʀ ${namaowner} 〕𔒝`,
wrongf: `〔 ᴇᴍᴘᴛʏ ғᴏʀᴍᴀᴛ / ᴛᴇxᴛ 〕𔒝`,
clears: `〔 ᴄʟᴇᴀʀ ᴀʟʟ sᴜᴄᴄᴇs 〕𔒝`,
levelup: `┌───〔 ᴄᴏɴɢʀᴀᴛᴜʟᴀᴛɪᴏɴs 〕\n┊📊ɴᴀᴍᴇ : ${pushname}\n┊📊ɴᴜᴍʙᴇʀ : ${sender.split('@')[0]}\n┊📊xᴘ : ${getLevelingXp(sender)}\n┊📊ʟɪᴍɪᴛ : +3\n┊📊ʀᴀɴᴋ : ${role}\n┊📊ʟᴇᴠᴇʟ : ${getLevel} ⊱ ${getLevelingLevel(sender)}\n└───────────𔒝`,
limitend: `〔 sᴏʀʀʏ ${pushname} ʏᴏᴜʀ ʟɪᴍɪᴛ ɪs ᴜᴘ〕𔒝\n〔ᴄᴏɴᴛᴀᴄᴛ ᴜs : wa.me/${nomerowner}〕𔒝\n\n〔ɴᴏᴛᴇ : ᴡᴇ ᴡɪʟʟ ɢɪᴠᴇ ʀᴀɴᴅᴏᴍ ғʀᴏᴍ 𝟷-𝟷𝟶 〕𔒝`,
}
//security
const groupMetadata = isGroup ? await Ruri.groupMetadata(from) : ''
const groupName = isGroup ? groupMetadata.subject : ''
const groupId = isGroup ? groupMetadata.jid : ''
const groupMembers = isGroup ? groupMetadata.participants : ''
const groupDesc = isGroup ? groupMetadata.desc : ''
q = args.join(' ')
const hour_now = moment().format('HH:mm:ss')
const groupAdmins = isGroup ? getGroupAdmins(groupMembers) : ''
const isBotGroupAdmins = groupAdmins.includes(botNumber) || false
const isGroupAdmins = groupAdmins.includes(sender) || false
const isEventon = isGroup ? event.includes(from) : false
const isLevelingOn = isGroup ? _leveling.includes(from) : false
const isWelkom = isGroup ? welkom.includes(from) : false
const isNsfw = isGroup ? nsfw.includes(from) : false
const isSimi = isGroup ? samih.includes(from) : false
const isAntiLink = isGroup ? antilink.includes(from) : false
const isAntiVirtex = isGroup ? antivirtex.includes(from) : false
const isTagDappa = isGroup ? antgdpaa.includes(from) : false
const isBadWord = isGroup ? badword.includes(from) : false
const isOwner = ownerNumber.includes(sender)
const isPremium = prem.includes(sender) || isOwner
const isAntiLinkTelegram = isGroup ? antitelegram.includes(from) : false
const isAntijawa = isGroup ? antijawa.includes(from) : false
const isAntigay = isGroup ? antigay.includes(from) : false
const isAntibocil = isGroup ? antibocil.includes(from) : false
const isAntiwibu = isGroup ? antiwibu.includes(from) : false
const isAntiLinkig = isGroup ? antilinkig.includes(from) : false
const isAntiLinkfb = isGroup ? antilinkfb.includes(from) : false
const isAntiLinkytc = isGroup ? antilinkytc.includes(from) : false
const isAntiLinkytv = isGroup ? antilinkytv.includes(from) : false
const isVerify = user.includes(sender)
const forwd = { forwardingScore: 1000, isForwarded: true }
const isBanned = ban.includes(sender)
const isImage = type === 'imageMessage'
const sekarang = new Date().getTime();
var ase = new Date();
var waktoo = ase.getHours();
switch(waktoo){
case 0: waktoo = 'ɢᴏᴏᴅ ɴɪɢʜᴛ🌚'; break;
case 1: waktoo = 'ɢᴏᴏᴅ ɴɪɢʜᴛ🌚'; break;
case 2: waktoo = 'ᴇᴀʀʟʏ ᴍᴏʀɴɪɴɢ🌒'; break;
case 3: waktoo = 'ᴇᴀʀʟʏ ᴍᴏʀɴɪɴɢ🌓'; break;
case 4: waktoo = 'ᴇᴀʀʟʏ ᴍᴏʀɴɪɴɢ🌔'; break;
case 5: waktoo = 'ᴇᴀʀʟʏ ᴍᴏʀɴɪɴɢ🌔'; break;
case 6: waktoo = 'ɢᴏᴏᴅ ᴍᴏʀɴɪɴɢ🌝'; break;
case 7: waktoo = 'ɢᴏᴏᴅ ᴍᴏʀɴɪɴɢ🌝'; break;
case 8: waktoo = 'ɢᴏᴏᴅ ᴍᴏʀɴɪɴɢ🌝'; break;
case 9: waktoo = 'ɢᴏᴏᴅ ᴍᴏʀɴɪɴɢ🌝'; break;
case 10: waktoo = 'ɢᴏᴏᴅ ᴍᴏʀɴɪɴɢ🌝'; break;
case 11: waktoo = 'ɢᴏᴏᴅ ᴍᴏʀɴɪɴɢ🌞'; break;
case 12: waktoo = 'ɢᴏᴏᴅ ᴀғᴛᴇʀɴᴏᴏɴ🌞'; break;
case 13: waktoo = 'ɢᴏᴏᴅ ᴀғᴛᴇʀɴᴏᴏɴ🌞'; break;
case 14: waktoo = 'ɢᴏᴏᴅ ᴀғᴛᴇʀɴᴏᴏɴ🌞'; break;
case 15: waktoo = 'ɢᴏᴏᴅ ᴀғᴛᴇʀɴᴏᴏɴ🌝'; break;
case 16: waktoo = 'ɢᴏᴏᴅ ᴀғᴛᴇʀɴᴏᴏɴ🌝'; break;
case 17: waktoo = 'ɢᴏᴏᴅ ᴀғᴛᴇʀɴᴏᴏɴ🌖'; break;
case 18: waktoo = 'ɢᴏᴏᴅ ᴇᴠᴇɴɪɴɢ🌘'; break;
case 19: waktoo = 'ɢᴏᴏᴅ ᴇᴠᴇɴɪɴɢ🌚'; break;
case 20: waktoo = 'ɢᴏᴏᴅ ɴɪɢʜᴛ🌚'; break;
case 21: waktoo = 'ɢᴏᴏᴅ ɴɪɢʜᴛ🌚'; break;
case 22: waktoo = 'ɢᴏᴏᴅ ɴɪɢʜᴛ🌚'; break;
case 23: waktoo = 'ɢᴏᴏᴅ ɴɪɢʜᴛ🌚'; break;
}
var tampilUcapan = '' + waktoo;
//buat fakereply
var ase = new Date();
var waktoonyabro = ase.getHours();
switch(waktoonyabro){
case 0: waktoonyabro = `ɢᴏᴏᴅ ɴɪɢʜᴛ ${pushname}🌛`; break;
case 1: waktoonyabro = `ɢᴏᴏᴅ ɴɪɢʜᴛ ${pushname}🌛`; break;
case 2: waktoonyabro = `ᴇᴀʀʟʏ ᴍᴏʀɴɪɴɢ ${pushname}🌛`; break;
case 3: waktoonyabro = `ᴇᴀʀʟʏ ᴍᴏʀɴɪɴɢ ${pushname}✨`; break;
case 4: waktoonyabro = `ᴇᴀʀʟʏ ᴍᴏʀɴɪɴɢ ${pushname}✨`; break;
case 5: waktoonyabro = `ᴇᴀʀʟʏ ᴍᴏʀɴɪɴɢ ${pushname}✨`; break;
case 6: waktoonyabro = `ɢᴏᴏᴅ ᴍᴏʀɴɪɴɢ ${pushname}✨`; break;
case 7: waktoonyabro = `ɢᴏᴏᴅ ᴍᴏʀɴɪɴɢ ${pushname}✨`; break;
case 8: waktoonyabro = `ɢᴏᴏᴅ ᴍᴏʀɴɪɴɢ ${pushname}✨`; break;
case 9: waktoonyabro = `ɢᴏᴏᴅ ᴍᴏʀɴɪɴɢ ${pushname}✨`; break;
case 10: waktoonyabro = `ɢᴏᴏᴅ ᴍᴏʀɴɪɴɢ ${pushname}✨`; break;
case 11: waktoonyabro = `ɢᴏᴏᴅ ᴍᴏʀɴɪɴɢ ${pushname}🔥`; break;
case 12: waktoonyabro = `ɢᴏᴏᴅ ᴀғᴛᴇʀɴᴏᴏɴ ${pushname}🔥`; break;
case 13: waktoonyabro = `ɢᴏᴏᴅ ᴀғᴛᴇʀɴᴏᴏɴ ${pushname}🔥`; break;
case 14: waktoonyabro = `ɢᴏᴏᴅ ᴀғᴛᴇʀɴᴏᴏɴ ${pushname}🔥`; break;
case 15: waktoonyabro = `ɢᴏᴏᴅ ᴀғᴛᴇʀɴᴏᴏɴ ${pushname}🌹`; break;
case 16: waktoonyabro = `ɢᴏᴏᴅ ᴀғᴛᴇʀɴᴏᴏɴ ${pushname}🌹`; break;
case 17: waktoonyabro = `ɢᴏᴏᴅ ᴀғᴛᴇʀɴᴏᴏɴ ${pushname}🌹`; break;
case 18: waktoonyabro = `ɢᴏᴏᴅ ᴇᴠᴇɴɪɴɢ ${pushname}🌛`; break;
case 19: waktoonyabro = `ɢᴏᴏᴅ ᴇᴠᴇɴɪɴɢ ${pushname}🌛`; break;
case 20: waktoonyabro = `ɢᴏᴏᴅ ɴɪɢʜᴛ ${pushname}🌛`; break;
case 21: waktoonyabro = `ɢᴏᴏᴅ ɴɪɢʜᴛ ${pushname}🌛`; break;
case 22: waktoonyabro = `ɢᴏᴏᴅ ɴɪɢʜᴛ ${pushname}🌛`; break;
case 23: waktoonyabro = `ɢᴏᴏᴅ ɴɪɢʜᴛ ${pushname}🌛`; break;
}
var ucapanFakereply = '' + waktoonyabro;
//AUTO
for (let svst of audionye){if (budy === svst)
{result = fs.readFileSync(`src/audio/${svst}.mp3`)
Ruri.sendMessage(from, result, audio, { quoted: Mel, mimetype: 'audio/mp4', ptt: true })}}
//fake reply
const freply = { key: { fromMe: false, participant: `0@s.whatsapp.net`, ...(from ? { remoteJid: '6283136505591-1614953337@g.us' } : {}) }, message: { 'imageMessage': { 'url': 'https://mmg.whatsapp.net/d/f/At0x7ZdIvuicfjlf9oWS6A3AR9XPh0P-hZIVPLsI70nM.enc', 'mimetype': 'image/png', 'caption': `${ucapanFakereply}`, 'fileSha256': '+Ia+Dwib70Y1CWRMAP9QLJKjIJt54fKycOfB2OEZbTU=', 'fileLength': '28777', 'height': 1080, 'width': 1079, 'mediaKey': 'vXmRR7ZUeDWjXy5iQk17TrowBzuwRya0errAFnXxbGc=', 'fileEncSha256': 'sR9D2RS5JSifw49HeBADguI23fWDz1aZu4faWG/CyRY=', 'directPath': '/v/t62.7118-24/21427642_840952686474581_572788076332761430_n.enc?oh=3f57c1ba2fcab95f2c0bb475d72720ba&oe=602F3D69', 'mediaKeyTimestamp': '1610993486', 'jpegThumbnail': fs.readFileSync('./lib/logo.jpeg')}}}
const ftoko = { key: { fromMe: false, participant: `0@s.whatsapp.net`, ...(from ? { remoteJid: 'status@broadcast' } : {}) }, message: { 'productMessage': { 'product': { 'productImage':{ 'mimetype': 'image/jpeg', 'jpegThumbnail': fs.readFileSync('./lib/logo.jpeg') }, 'title': `${Sayangggg}`, 'productImageCount': 9999 }, 'businessOwnerJid': `0@s.whatsapp.net`}}}
const fkontak = { key: { fromMe: false, participant: `0@s.whatsapp.net`, ...(from ? { remoteJid: `0@s.whatsapp.net` } : {}) }, message: { 'contactMessage': { 'displayName': `${ucapanFakereply}`, 'vcard': `BEGIN:VCARD\nVERSION:3.0\nN:XL;${ucapanFakereply},;;;\nFN:${ucapanFakereply},\nitem1.TEL;waid=${sender.split('@')[0]}:${sender.split('@')[0]}\nitem1.X-ABLabel:Ponsel\nEND:VCARD`, 'jpegThumbnail': fs.readFileSync('./lib/logo.jpeg')}}}
//Time
const time = moment.tz('Asia/Kolkata').format('HH:mm:ss')
const wita = moment.tz('Asia/Kolkata').format('HH:mm:ss')
const wit = moment.tz('Asia/Kolkata').format('HH:mm:ss')
const date = new Date().toLocaleDateString()
/*=======================================================*/
/*©RURIBOTZ ®AMELCANTIK @RURICHAN (RURIBOTWHATSAPP) [BOTWHATSAPPTERMUX]*/
/*====================================================[ GAME ]==============================================================*/
const sotoy = ['🍊 : 🍒 : 🍐','🍒 : 🔔 : 🍊','🍇 : 🍇 : 🍇','🍊 : 🍋 : 🔔','🔔 : 🍒 : 🍐','🔔 : 🍒 : 🍊','🍊 : 🍋 : 🔔', '🍐 : 🍒 : 🍋','🍐 : 🍐 : 🍐','🍊 : 🍒 : 🍒','🔔 : 🔔 : 🍇','🍌 : 🍒 : 🔔','🍐 : 🔔 : 🔔','🍊 : 🍋 : 🍒','🍋 : 🍋 : 🍌','🔔 : 🔔 : 🍇','🔔 : 🍐 : 🍇','🔔 : 🔔 : 🔔','🍒 : 🍒 : 🍒','🍌 : 🍌 : 🍌']
const sotoy2 = ['🍊 : 🍒 : 🍐','🍒 : 🔔 : 🍊','🍊 : 🍋 : 🔔','🔔 : 🍒 : 🍐','🔔 : 🍒 : 🍊','🍊 : 🍋 : 🔔', '🍐 : 🍒 : 🍋','🍊 : 🍒 : 🍒','🔔 : 🔔 : 🍇','🍌 : 🍒 : 🔔','🍐 : 🔔 : 🔔','🍊 : 🍋 : 🍒','🍋 : 🍋 : 🍌','🔔 : 🔔 : 🍇','🔔 : 🍐 : 🍇']
const sotoy1 = ['🍊 : 🍒 : 🍐','🍒 : 🔔 : 🍊','🍊 : 🍋 : 🔔','🔔 : 🍒 : 🍐','🔔 : 🍒 : 🍊','🍊 : 🍋 : 🔔', '🍐 : 🍒 : 🍋','🍊 : 🍒 : 🍒','🔔 : 🔔 : 🍇','🍌 : 🍒 : 🔔','🍐 : 🔔 : 🔔','🍊 : 🍋 : 🍒','🍋 : 🍋 : 🍌','🔔 : 🔔 : 🍇','🔔 : 🍐 : 🍇']
const sotoy3 = ['🔔 : 🔔 : 🔔','🍒 : 🍒 : 🍒','🍌 : 🍌 : 🍌']
const wloytoy = ['X : O : X','O : X : O','X : O : X','O : X : O','X : O : X','O : X : O','X : O : X', 'O : X : O','X : O : X','O : X : O','X : O : X','O : X : O','X : O : X','O : X : O','X : O : X','O : X : O','X : O : X','O : X : O','X : O : X','O : X : O']
const wloytoy1 = ['O : X : O','X : O : X','O : X : O','X : O : X','O : X : O','X : O : X', 'O : X : O','X : O : X','O : X : O','X : O : X','O : X : O','X : O : X','O : X : O','X : O : X','O : X : O']
const wloytoy2 = ['X : O : X','O : X : O','X : O : X','O : X : O','X : O : X','O : X : O', 'X : O : X','O : X : O','X : O : X','O : X : O','X : O : X','O : X : O','X : O : X','O : X : O','X : O : X']
const wloytoy3 = ['X : X : X','O : O : O','X : X : X']
const buruh1 = ['🐳','🦈','🐬','🐋','🐟','🐠','🦐','🦑','🦀','🐚']
const buruh2 = ['🐔','🦃','🐿','🐐','🐏','🐖','🐑','🐎','🐺','🦩']
const buruh3 = ['🦋','🕷','🐝','🐉','🦆','🦅','🕊','🐧','🐦','🦇']
const buruh11 = buruh1[Math.floor(Math.random() * (buruh1.length))]
const buruh22 = buruh2[Math.floor(Math.random() * (buruh2.length))]
const buruh33 = buruh3[Math.floor(Math.random() * (buruh3.length))]
/*====================================================[ ROLE LEVELING ]==============================================================*/
const isUrl = (url) => {
return url.match(new RegExp(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)/, 'gi'))
}
const reply = (teks) => {
Ruri.sendMessage(from, teks, text, {sendEphemeral: true, thumbnail: fs.readFileSync('./lib/logo.jpeg', 'base64'), quoted: ftoko})
}
const sendMess = (hehe, teks) => {
Ruri.sendMessage(hehe, teks, text)
}
const mentions = (teks, memberr, id) => {
(id == null || id == undefined || id == false) ? Ruri.sendMessage(from, teks.trim(), extendedText, {contextInfo: {'mentionedJid': memberr}}) : Ruri.sendMessage(from, teks.trim(), extendedText, {quoted: Mel, contextInfo: {'mentionedJid': memberr}})
}
const sendImage = (teks) => {
Ruri.sendMessage(from, teks, image, {quoted:Mel})
}
function monospace(string) {
return '```' + string + '```'
}
function randomNomor(angka){
return Math.floor(Math.random() * angka) + 1
}
const costum = (pesan, tipe, target, target2) => {
Ruri.sendMessage(from, pesan, tipe, {sendEphemeral: true, thumbnail: fs.readFileSync('./lib/logo.jpeg', 'base64'), quoted: { key: { fromMe: false, participant: `${target}`, ...(from ? { remoteJid: from } : {}) }, message: { conversation: `${target2}` }}})
}
const sendPtt = (teks) => {
Ruri.sendMessage(from, audio, mp3, {quoted:Mel})
}
const dappauhuy = (pesan, tipe, target, target2) => {
Ruri.sendMessage(from, pesan, tipe, { 'contextInfo': {mentionedJid: [sender]}, quoted: { 'key': { 'participant': `${target}`, 'remoteJid': '393470602054-1351628616@g.us', 'fromMe': false, 'id': 'B391837A58338BA8186C47E51FFDFD4A' }, 'message': { 'documentMessage': { 'jpegThumbnail': fs.readFileSync('./lib/logo.jpeg'), 'mimetype': 'application/octet-stream', 'title': `${target2}`, 'fileLength': '36', 'pageCount': 0, 'fileName': `${target2}` }}, 'messageTimestamp': '1614069378', 'status': 'PENDING'}})
}
const sendStickerFromUrl = async(to, url) => {
var names = Date.now() / 10000;
var download = function (uri, filename, callback) {
request.head(uri, function (err, res, body) {
request(uri).pipe(fs.createWriteStream(filename)).on('close', callback);
});
};
download(url, './stik' + names + '.png', async function () {
console.log('selesai');
let filess = './stik' + names + '.png'
let asw = './stik' + names + '.webp'
exec(`ffmpeg -i ${filess} -vcodec libwebp -filter:v fps=fps=20 -lossless 1 -loop 0 -preset default -an -vsync 0 -s 512:512 ${asw}`, (err) => {
let media = fs.readFileSync(asw)
Ruri.sendMessage(to, media, MessageType.sticker,{quoted:Mel})
fs.unlinkSync(filess)
fs.unlinkSync(asw)
});
});
}
async function sendFileFromUrl(from, url, caption, Mel, men) {
let mime = '';
let res = await axios.head(url)
mime = res.headers['content-type']
let type = mime.split("/")[0]+"Message"
if(mime === "image/gif"){
type = MessageType.video
mime = Mimetype.gif
}
if(mime === "application/pdf"){
type = MessageType.document
mime = Mimetype.pdf
}
if(mime.split("/")[0] === "audio"){
mime = Mimetype.mp4Audio
}
return Ruri.sendMessage(from, await getBuffer(url), type, {caption: caption, quoted: Mel, mimetype: mime, contextInfo: {"mentionedJid": men ? men : []}})
}
const textImg = (teks) => {
return Ruri.sendMessage(from, teks, text, {quoted: Mel, thumbnail: fs.readFileSync('./lib/logo.jpeg')})
}
const levelRole = getLevelingLevel(sender)
var role = 'Newbie ㋡'
if (levelRole <= 2) {
role = 'Newbie ㋡'
} else if (levelRole <= 4) {
role = 'Beginner Grade 1 ⚊¹'
} else if (levelRole <= 6) {
role = 'Beginner Grade 2 ⚊²'
} else if (levelRole <= 8) {
role = 'Beginner Grade 3 ⚊³'
} else if (levelRole <= 10) {
role = 'Beginner Grade 4 ⚊⁴'
} else if (levelRole <= 12) {
role = 'Private Grade 1 ⚌¹'
} else if (levelRole <= 14) {
role = 'Private Grade 2 ⚌²'
} else if (levelRole <= 16) {
role = 'Private Grade 3 ⚌³'
} else if (levelRole <= 18) {
role = 'Private Grade 4 ⚌⁴'
} else if (levelRole <= 20) {
role = 'Private Grade 5 ⚌⁵'
} else if (levelRole <= 22) {
role = 'Corporal Grade 1 ☰¹'
} else if (levelRole <= 24) {
role = 'Corporal Grade 2 ☰²'
} else if (levelRole <= 26) {
role = 'Corporal Grade 3 ☰³'
} else if (levelRole <= 28) {
role = 'Corporal Grade 4 ☰⁴'
} else if (levelRole <= 30) {
role = 'Corporal Grade 5 ☰⁵'
} else if (levelRole <= 32) {
role = 'Sergeant Grade 1 ≣¹'
} else if (levelRole <= 34) {
role = 'Sergeant Grade 2 ≣²'
} else if (levelRole <= 36) {
role = 'Sergeant Grade 3 ≣³'
} else if (levelRole <= 38) {
role = 'Sergeant Grade 4 ≣⁴'
} else if (levelRole <= 40) {
role = 'Sergeant Grade 5 ≣⁵'
} else if (levelRole <= 42) {
role = 'Staff Grade 1 ﹀¹'
} else if (levelRole <= 44) {
role = 'Staff Grade 2 ﹀²'
} else if (levelRole <= 46) {
role = 'Staff Grade 3 ﹀³'
} else if (levelRole <= 48) {
role = 'Staff Grade 4 ﹀⁴'
} else if (levelRole <= 50) {
role = 'Staff Grade 5 ﹀⁵'
} else if (levelRole <= 52) {
role = 'Sergeant Grade 1 ︾¹'
} else if (levelRole <= 54) {
role = 'Sergeant Grade 2 ︾²'
} else if (levelRole <= 56) {
role = 'Sergeant Grade 3 ︾³'
} else if (levelRole <= 58) {
role = 'Sergeant Grade 4 ︾⁴'
} else if (levelRole <= 60) {
role = 'Sergeant Grade 5 ︾⁵'
} else if (levelRole <= 62) {
role = '2nd Lt. Grade 1 ♢¹ '
} else if (levelRole <= 64) {
role = '2nd Lt. Grade 2 ♢²'