-
Notifications
You must be signed in to change notification settings - Fork 516
/
Copy pathbuilder.html
1181 lines (1101 loc) · 53.5 KB
/
builder.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Config Builder</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f9;
color: #333;
margin: 0;
padding: 0 10px 10px 10px; /* Remove top padding */
display: flex;
flex-direction: column;
align-items: center;
}
h1 {
color: #333;
}
.dark-mode h1,
.dark-mode label {
color: #4AF626;
}
@keyframes rgbAnimation {
0% { color: red; }
33% { color: green; }
66% { color: blue; }
100% { color: red; }
}
h1 {
animation: rgbAnimation 5s infinite;
}
.form-group {
margin-bottom: 15px;
width: 100%;
max-width: 500px;
}
label {
display: block;
margin-bottom: 5px;
font-weight: bold;
color: #555;
}
input[type="text"], select, textarea {
width: calc(150% - 70px); /* Increase width to 1.5 times and accommodate the button */
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
input::placeholder, textarea::placeholder {
color: #888;
}
.dark-mode input::placeholder, .dark-mode textarea::placeholder {
color: #888;
}
button {
padding: 10px 20px;
background-color: #007bff;
color: #fff;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
}
button:hover {
background-color: #0056b3;
}
#output {
margin-top: 20px;
width: 100%;
max-width: 500px;
background: #fff;
border: 1px solid #ccc;
border-radius: 4px;
padding: 10px;
font-family: monospace;
white-space: pre-wrap;
}
.dark-mode {
background-color: #050505;
color: #f4f4f9;
}
.dark-mode input[type="text"], .dark-mode select, .dark-mode textarea {
background-color: #555;
color: #f4f4f9;
border: 1px solid #4AF626;
}
.dark-mode button {
background-color: #0056b3;
}
.dark-mode button:hover {
background-color: #003f7f;
}
.dark-mode #output {
background: #444;
border: 1px solid #666;
}
.switch {
position: absolute;
top: 20px;
right: 20px;
display: flex;
align-items: center;
font-size: 18px;
}
.switch input {
display: none;
}
.slider {
width: 40px;
height: 20px;
background-color: #ccc;
border-radius: 20px;
position: relative;
cursor: pointer;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}
.slider::before {
content: "";
position: absolute;
width: 18px;
height: 18px;
background-color: #fff;
border-radius: 50%;
top: 1px;
left: 1px;
transition: 0.3s;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}
input:checked + .slider::before {
transform: translateX(20px);
}
input:checked + .slider {
background-color: #007bff;
}
.mode-text {
margin-right: 10px;
font-weight: bold;
}
.light-mode .switch {
font-size: 36px; /* 2x the size */
}
.light-mode .slider {
width: 80px; /* 2x the size */
height: 40px; /* 2x the size */
border-radius: 40px; /* 2x the size */
}
.light-mode .slider::before {
width: 36px; /* 2x the size */
height: 36px; /* 2x the size */
top: 2px; /* Adjusted for 2x size */
left: 2px; /* Adjusted for 2x size */
}
input:checked + .light-mode .slider::before {
transform: translateX(40px); /* Adjusted for 2x size */
}
.light-mode-message {
display: none;
color: red;
font-size: 36px; /* Make the text bigger */
margin-top: 10px;
}
.light-mode .light-mode-message {
display: block;
}
.required {
color: red;
margin-left: 5px;
}
.list-item {
display: flex;
align-items: center;
margin-bottom: 5px;
}
.list-item span {
flex-grow: 1;
}
.list-item-number {
margin-right: 10px;
}
.remove-btn {
background-color: lightgrey;
color: black;
border: none;
border-radius: 4px;
cursor: pointer;
width: 20px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
margin-left: 10px;
}
.input-group {
display: flex;
align-items: center;
}
.input-group button {
background-color: #555;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
margin-left: 10px;
padding: 10px;
width: 60px; /* Fixed width for the button */
}
.input-group input:not(:placeholder-shown) + button {
background-color: #0056b3;
}
@keyframes rainbow {
0% { background-color: red; color: white; }
16% { background-color: orange; color: black; }
33% { background-color: yellow; color: black; }
50% { background-color: green; color: white; }
66% { background-color: blue; color: white; }
83% { background-color: indigo; color: white; }
100% { background-color: violet; color: white; }
}
.rainbow-button {
animation: rainbow 5s infinite;
border: none;
border-radius: 4px;
cursor: pointer;
padding: 20px 40px; /* Increase padding for a bigger button */
font-size: 20px; /* Increase font size */
}
.blue-button {
background-color: #007bff;
color: #fff;
border: none;
border-radius: 4px;
cursor: pointer;
padding: 10px 20px;
font-size: 16px;
}
.blue-button:hover {
background-color: #0056b3;
}
.blue-text {
color: #007bff;
}
.white-text {
color: white;
}
.description-box {
display: none;
position: absolute;
width: 500px; /* Increased width */
padding: 20px;
background-color: #464a52; /* Blue-gray background */
border: 1px solid #464a52;
border-radius: 10px; /* Rounded corners for bubble effect */
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
font-size: 20px; /* Increased font size */
color: #ccc;
left: 150px; /* Moved more to the right */
z-index: 1000; /* Ensure it is above other elements */
}
.description-box.visible {
display: block;
}
.upload-button {
margin-top: 10px;
padding: 10px 20px;
background-color: #28a745;
color: #fff;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
}
.upload-button:hover {
background-color: #218838;
}
.hidden-input {
display: none;
}
.sublist {
margin-top: 10px;
padding-left: 20px;
}
.sublist-item {
display: flex;
align-items: center;
margin-bottom: 5px;
position: relative;
}
.sublist-item .toggle-btn {
background-color: #555;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
padding: 10px;
width: 60px; /* Fixed width for the button */
margin-left: 10px; /* Add space between the on/off button and the textbox */
}
.sublist-item .toggle-btn.active {
background-color: #28a745;
}
.sublist-item .description {
display: none;
position: absolute;
top: 50%;
transform: translateY(-50%); /* Center vertically next to the textbox */
left: -340px; /* Adjusted to position the description on the left */
width: 300px;
padding: 10px;
background-color: #464a52;
border: 1px solid #464a52;
border-radius: 4px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
font-size: 14px;
color: #ccc;
z-index: 1;
}
.sublist-item:hover .description {
display: block;
}
.move-btn {
background-color: #555;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
padding: 5px;
margin-left: 5px;
}
.draggable {
cursor: move;
margin-right: 10px;
}
.sublist-item span {
margin-right: 10px; /* Add space between the name and the textbox */
}
.sublist-item .add-btn {
background-color: #555;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
padding: 10px;
margin-left: 10px;
}
.sublist-item .add-btn.active {
background-color: #28a745;
}
.single-value-input {
width: calc(100% - 70px); /* Adjust width to accommodate the button */
}
.single-value-input + button {
margin-left: 10px;
}
</style>
</head>
<body class="dark-mode">
<div class="switch">
<span class="mode-text" id="modeText">Switch to Light Mode</span>
<input type="checkbox" id="darkModeSwitch" checked>
<label for="darkModeSwitch" class="slider"></label>
</div>
<div class="light-mode-message">This is disgusting go back to dark mode fool</div>
<div class="description-box" id="descriptionBoxToken">
Enter your bot token here. The bot token is a unique identifier for your bot and is used to authenticate your bot with the Discord API. Keep it secret and do not share it with anyone.
</div>
<div class="description-box" id="descriptionBoxPermissions">
Enter the user IDs or tags of users who should have permissions to use the bot. You need at least one here.
</div>
<div class="description-box" id="descriptionBoxMessages">
Enter the fixed bomb words or phrases here. These words or phrases will be used during the bombing commands: channelBomb, categoryBomb, roleBomb. The option for messages in webhook spam (in the actual Discord chat) are in the next line. <br><br>Examples:<br> skiddie123 was here! <br> nukedbozos!
</div>
<div class="description-box" id="descriptionBoxWebhookContent">
Enter the content for webhook spam messages. These messages will be sent by the webhook in all the channels. <br><br>Examples:<br> @everyone<br> imagine getting nuked by a bunch of skiddies<br> join discord.gg/abcdefg for toes!
</div>
<div class="description-box" id="descriptionBoxWebhookPictures">
Enter the URLs for webhook spam profile pictures. These pictures will be used as the profile pictures by the webhooks spamming messages. Make sure these these are the links to the picture it self, ending in .png. <br><br> Go to https://imgur.com/upload , drop the image, and when it's done uploading, right click the image and click open in new tab. Use that link as the URL. <br><br>It should look like https://i.imgur.com/mtUJlYn.png
</div>
<div class="description-box" id="descriptionBoxWebhookUsernames">
Enter the usernames for webhook spam. These usernames will be used by the webhooks spamming messages. <br><br>Examples:<br> nuking bot 69<br> skidderino123<br> hackedlolol
</div>
<div class="description-box" id="descriptionBoxWebhookMessageAmount">
Enter the amount of messages to be sent by the webhook. Try to keep it less than 400 or it will be very laggy for your computer. <br><br>Examples:<br> 200 <br> 250 <br> 100
</div>
<div class="description-box" id="descriptionBoxAfterCommands">
Enter the commands to be executed after the nuke below. These commands will run in sequence.
</div>
<div class="description-box" id="descriptionBoxBanWhitelist">
(Optional) Enter the user IDs to be whitelisted from bans. These users will not be banned during the nuke.
</div>
<div class="description-box" id="descriptionBoxCommandPrefix">
Enter the command prefix here. The default command prefix is " . ". The command prefix is used to invoke commands in the bot via Discord.
</div>
<h1>C-Real Configuration Builder</h1>
<form id="configForm">
<div class="form-group">
<label for="token">Bot Token:<span class="required">*</span> <span class="required">required</span></label>
<input type="text" id="token" name="token" placeholder="Enter bot token" required>
</div>
<div class="form-group">
<label for="permissions">Permissions User IDs:<span class="required">*</span> <span class="required">required</span></label>
<div class="input-group">
<input type="text" id="permissionsInput" placeholder="eg., 314853603695394817">
<button type="button" onclick="addPermission()">Add</button>
</div>
<div id="permissionsList"></div>
<style>
.custom-checkbox {
display: flex;
align-items: center;
position: relative;
}
.custom-checkbox input {
display: none;
}
.custom-checkbox .slider {
width: 40px;
height: 20px;
background-color: #ccc;
border-radius: 20px;
position: relative;
cursor: pointer;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
margin-left: 10px;
}
.custom-checkbox .slider::before {
content: "";
position: absolute;
width: 18px;
height: 18px;
background-color: #fff;
border-radius: 50%;
top: 1px;
left: 1px;
transition: 0.3s;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}
.custom-checkbox input:checked + .slider::before {
transform: translateX(20px);
}
.custom-checkbox input:checked + .slider {
background-color: #007bff;
}
</style>
<div class="form-group">
<label for="status">Initial Bot Status (not nuking):</label>
<select id="status" name="status">
<option value="offline">Offline</option>
<option value="online">Online</option>
<option value="idle">Idle</option>
<option value="dnd">Do Not Disturb</option>
</select>
</div>
<div class="form-group">
<label for="messages">Fixed Bomb Words:</label>
<div class="input-group">
<input type="text" id="messagesInput" placeholder="eg., nukedbozo">
<button type="button" onclick="addMessage()">Add</button>
</div>
<div id="messagesList"></div>
</div>
<div class="form-group">
<label for="webhookContent">Webhook Spam Messages:</label>
<div class="input-group">
<input type="text" id="webhookContentInput" placeholder="eg., @everyone, nuked by me!">
<button type="button" onclick="addWebhookContent()">Add</button>
</div>
<div id="webhookContentList"></div>
</div>
<div class="form-group">
<label for="webhookPictures">Webhook Spam PFPs:</label>
<div class="input-group">
<input type="text" id="webhookPicturesInput" placeholder="eg., https://i.imgur.com/ab.png">
<button type="button" onclick="addWebhookPictures()">Add</button>
</div>
<div id="webhookPicturesList"></div>
</div>
<div class="form-group">
<label for="webhookUsernames">Webhook Spam Usernames:</label>
<div class="input-group">
<input type="text" id="webhookUsernamesInput" placeholder="eg., nuking bot 69">
<button type="button" onclick="addWebhookUsernames()">Add</button>
</div>
<div id="webhookUsernamesList"></div>
</div>
<div class="form-group">
<label for="webhookMessageAmount">Webhook Message Amount (Dont do too many, 200 is good):</label>
<input type="text" id="webhookMessageAmountInput" placeholder="Enter amount">
</div>
<div class="form-group">
<label for="afterCommands">After Commands:</label>
<div class="input-group">
<input type="text" id="no" placeholder="Read Description" style="width: calc(100% - 70px);">
<!-- <button type="button" onclick="addAfterCommand()">Add</button> -->
</div>
<div id="afterCommandsList"></div>
<div class="sublist" id="sublist">
<div class="sublist-item" draggable="true">
<span class="draggable">☰</span>
<span>unban</span>
<input type="text" id="unbanInput" placeholder="User ID">
<button type="button" class="toggle-btn" onclick="toggleButton(this)">Off</button>
<button type="button" class="add-btn" onclick="addSublistItem('unban')">Add</button>
<div id="unbanList"></div>
<div class="description">Unbans specified users (User IDs)</div>
</div>
<div class="sublist-item" draggable="true">
<span class="draggable">☰</span>
<span>bestRole</span>
<input type="text" id="bestRoleInput" placeholder="User ID">
<button type="button" class="toggle-btn" onclick="toggleButton(this)">Off</button>
<button type="button" class="add-btn" onclick="addSublistItem('bestRole')">Add</button>
<div id="bestRoleList"></div>
<div class="description">Gives best possible role to specified users(User IDs)</div>
</div>
<div class="sublist-item" draggable="true">
<span class="draggable">☰</span>
<span>autoStatus</span>
<button type="button" class="toggle-btn" onclick="toggleButton(this); statustrue = this.classList.contains('active');">Off</button>
<div class="description">Automatically changes status of the bot so it moves around in the user side bar making it harder to ban</div>
</div>
<div class="sublist-item" draggable="true">
<span class="draggable">☰</span>
<span>autoNick</span>
<button type="button" class="toggle-btn" onclick="toggleButton(this); nicktrue = this.classList.contains('active');">Off</button>
<div class="description">Automatically changes nickname of the bot so it moves around in the user side bar making it harder to ban</div>
</div>
<div class="sublist-item" draggable="true">
<span class="draggable">☰</span>
<span>serverName</span>
<input type="text" id="serverNameInput" class="single-value-input" placeholder="Name of server">
<button type="button" class="toggle-btn" onclick="toggleButton(this)">Off</button>
<div id="serverNameList"></div>
<div class="description">Changes server name</div>
</div>
<div class="sublist-item" draggable="true">
<span class="draggable">☰</span>
<span>serverIcon</span>
<input type="text" id="serverIconInput" class="single-value-input" placeholder="Image URL, like webhook spam PFPs above">
<button type="button" class="toggle-btn" onclick="toggleButton(this)">Off</button>
<div id="serverIconList"></div>
<div class="description">Changes server icon. Must be a link to an image, ending in png! Same process as webhook spam PFPs. </div>
</div>
<div class="sublist-item" draggable="true">
<span class="draggable">☰</span>
<span>addVoiceChannel</span>
<input type="text" id="addVoiceChannelInput" placeholder="Name of voice channel">
<button type="button" class="toggle-btn" onclick="toggleButton(this)">Off</button>
<button type="button" class="add-btn" onclick="addSublistItem('addVoiceChannel')">Add</button>
<div id="addVoiceChannelList"></div>
<div class="description">Adds voice channels with specified name. Helpful for talking to the server owner in voice chat after you nuked their server!</div>
</div>
<div class="sublist-item" draggable="true">
<span class="draggable">☰</span>
<span>channelBomb</span>
<input type="text" id="channelBombInput" class="single-value-input" placeholder="Number of channels to add using Fixed Words as list">
<button type="button" class="toggle-btn" onclick="toggleButton(this)">Off</button>
<div id="channelBombList"></div>
<div class="description">Adds specified amount of amount of text channels. The names from fixed bomb words above will be used.</div>
</div>
<div class="sublist-item" draggable="true">
<span class="draggable">☰</span>
<span>categoryBomb</span>
<input type="text" id="categoryBombInput" class="single-value-input" placeholder="Number of categories to add using Fixed Words as list">
<button type="button" class="toggle-btn" onclick="toggleButton(this)">Off</button>
<div id="categoryBombList"></div>
<div class="description">Adds specified amount of categories. The names from fixed bomb words above will be used.</div>
</div>
<div class="sublist-item" draggable="true">
<span class="draggable">☰</span>
<span>roleBomb</span>
<input type="text" id="roleBombInput" class="single-value-input" placeholder="Number of roles to add using Fixed Words as list">
<button type="button" class="toggle-btn" onclick="toggleButton(this)">Off</button>
<div id="roleBombList"></div>
<div class="description">Adds specified amount of roles. The names from fixed bomb words above will be used.</div>
</div>
<div class="sublist-item" draggable="true">
<span class="draggable">☰</span>
<span>addChannel</span>
<input type="text" id="addChannelInput" placeholder="Name of text channel">
<button type="button" class="toggle-btn" onclick="toggleButton(this)">Off</button>
<button type="button" class="add-btn" onclick="addSublistItem('addChannel')">Add</button>
<div id="addChannelList"></div>
<div class="description">Adds singular text channel with specified name.</div>
</div>
<div class="sublist-item" draggable="true">
<span class="draggable">☰</span>
<span>ban</span>
<input type="text" id="banInput" placeholder="User ID">
<button type="button" class="toggle-btn" onclick="toggleButton(this)">Off</button>
<button type="button" class="add-btn" onclick="addSublistItem('ban')">Add</button>
<div id="banList"></div>
<div class="description">Bans specific user. Not very useful because .nuke already bans all.</div>
</div>
</div>
</div>
<div class="form-group">
<label for="banWhitelist">(Optional) Ban Whitelist User IDs:</label>
<div class="input-group">
<input type="text" id="banWhitelistInput" placeholder="eg., 314853603695394817">
<button type="button" onclick="addBanWhitelist()">Add</button>
</div>
<div id="banWhitelistList"></div>
</div>
<button type="button" class="blue-button" onclick="confirmGenerateConfig()">Generate Configuration</button>
<script>
function confirmGenerateConfig() {
if (confirm("Are you sure you want to generate a config with these settings?")) {
generateConfig();
}
}
</script>
<button type="button" class="upload-button" onclick="document.getElementById('uploadInput').click()">Upload Config</button>
<input type="file" id="uploadInput" class="hidden-input" accept=".json" onchange="uploadConfig(event)">
</form>
<div id="output" hidden>
<h3>Generated Configuration</h3>
<h3>Go to same folder as where C-REAL is located, then make a new folder called data and place in there. Make sure to restart the code. <br> <br> .../data/default.json</h3>
<pre id="configOutput"></pre>
<h3>Join Discord if you need help: <a href="https://discord.gg/6v98EHcssV" target="_blank" rel="noopener">https://discord.gg/6v98EHcssV</a></h3>
<button type="button" class="rainbow-button" onclick="downloadConfig()">Download Config</button>
</div>
<script>
function addSublistItem(type) {
const input = document.getElementById(`${type}Input`);
const list = document.getElementById(`${type}List`);
if (input.value.trim()) {
if (['channelBomb', 'categoryBomb', 'roleBomb', 'serverName', 'serverIcon'].includes(type)) {
list.innerHTML = ''; // Clear existing items for single-value inputs
}
const itemNumber = list.children.length + 1;
const item = document.createElement('div');
item.className = 'list-item';
item.innerHTML = `<span class="list-item-number">${itemNumber}.</span><span>${input.value.trim()}</span><button class="remove-btn" onclick="removeItem(this)">x</button>`;
list.appendChild(item);
input.value = '';
closeOutput();
}
}
function addPermission() {
const input = document.getElementById('permissionsInput');
const list = document.getElementById('permissionsList');
if (input.value.trim()) {
const itemNumber = list.children.length + 1;
const item = document.createElement('div');
item.className = 'list-item';
item.innerHTML = `<span class="list-item-number">${itemNumber}.</span><span>${input.value.trim()}</span><button class="remove-btn" onclick="removeItem(this)">x</button>`;
list.appendChild(item);
input.value = '';
closeOutput();
}
}
function addAfterCommand() {
const input = document.getElementById('afterCommandsInput');
const list = document.getElementById('afterCommandsList');
if (input.value.trim()) {
const itemNumber = list.children.length + 1;
const item = document.createElement('div');
item.className = 'list-item';
item.innerHTML = `<span class="list-item-number">${itemNumber}.</span><span>${input.value.trim()}</span><button class="remove-btn" onclick="removeItem(this)">x</button>`;
list.appendChild(item);
input.value = '';
closeOutput();
}
}
function addBanWhitelist() {
const input = document.getElementById('banWhitelistInput');
const list = document.getElementById('banWhitelistList');
if (input.value.trim()) {
const itemNumber = list.children.length + 1;
const item = document.createElement('div');
item.className = 'list-item';
item.innerHTML = `<span class="list-item-number">${itemNumber}.</span><span>${input.value.trim()}</span><button class="remove-btn" onclick="removeItem(this)">x</button>`;
list.appendChild(item);
input.value = '';
closeOutput();
}
}
function addMessage() {
const input = document.getElementById('messagesInput');
const list = document.getElementById('messagesList');
if (input.value.trim()) {
const itemNumber = list.children.length + 1;
const item = document.createElement('div');
item.className = 'list-item';
item.innerHTML = `<span class="list-item-number">${itemNumber}.</span><span>${input.value.trim()}</span><button class="remove-btn" onclick="removeItem(this)">x</button>`;
list.appendChild(item);
input.value = '';
closeOutput();
}
}
function addWebhookContent() {
const input = document.getElementById('webhookContentInput');
const list = document.getElementById('webhookContentList');
if (input.value.trim()) {
const itemNumber = list.children.length + 1;
const item = document.createElement('div');
item.className = 'list-item';
item.innerHTML = `<span class="list-item-number">${itemNumber}.</span><span>${input.value.trim()}</span><button class="remove-btn" onclick="removeItem(this)">x</button>`;
list.appendChild(item);
input.value = '';
closeOutput();
}
}
function addWebhookPictures() {
const input = document.getElementById('webhookPicturesInput');
const list = document.getElementById('webhookPicturesList');
const url = input.value.trim();
if (url && url.endsWith('.png')) {
const itemNumber = list.children.length + 1;
const item = document.createElement('div');
item.className = 'list-item';
item.innerHTML = `<span class="list-item-number">${itemNumber}.</span><span>${url}</span><button class="remove-btn" onclick="removeItem(this)">x</button>`;
list.appendChild(item);
input.value = '';
closeOutput();
} else {
alert('Go to https://imgur.com/upload , drop the image, and when it\'s done uploading, right click the image and click open in new tab. Use that link as the URL. \nIt should look like https://i.imgur.com/mtUJlYn.png . \nEnsure it ends in .png');
}
}
function addWebhookUsernames() {
const input = document.getElementById('webhookUsernamesInput');
const list = document.getElementById('webhookUsernamesList');
if (input.value.trim()) {
const itemNumber = list.children.length + 1;
const item = document.createElement('div');
item.className = 'list-item';
item.innerHTML = `<span class="list-item-number">${itemNumber}.</span><span>${input.value.trim()}</span><button class="remove-btn" onclick="removeItem(this)">x</button>`;
list.appendChild(item);
input.value = '';
closeOutput();
}
}
function removeItem(button) {
const list = button.parentElement.parentElement;
button.parentElement.remove();
Array.from(list.children).forEach((item, index) => {
item.querySelector('.list-item-number').textContent = `${index + 1}.`;
});
closeOutput();
}
function handleKeyPress(event, addFunction) {
if (event.key === 'Enter' && !event.shiftKey) {
event.preventDefault();
addFunction();
}
}
document.getElementById('permissionsInput').addEventListener('keypress', function(event) {
handleKeyPress(event, addPermission);
});
document.getElementById('messagesInput').addEventListener('keypress', function(event) {
handleKeyPress(event, addMessage);
});
document.getElementById('webhookContentInput').addEventListener('keypress', function(event) {
handleKeyPress(event, addWebhookContent);
});
document.getElementById('webhookPicturesInput').addEventListener('keypress', function(event) {
handleKeyPress(event, addWebhookPictures);
});
document.getElementById('webhookUsernamesInput').addEventListener('keypress', function(event) {
handleKeyPress(event, addWebhookUsernames);
});
document.getElementById('banWhitelistInput').addEventListener('keypress', function(event) {
handleKeyPress(event, addBanWhitelist);
});
document.getElementById('permissionsInput').addEventListener('focus', function() {
const box = document.getElementById('descriptionBoxPermissions');
box.style.top = this.getBoundingClientRect().top + window.scrollY + 30 + 'px'; // Adjusted position
box.classList.add('visible');
});
document.getElementById('permissionsInput').addEventListener('blur', function() {
document.getElementById('descriptionBoxPermissions').classList.remove('visible');
});
document.getElementById('no').addEventListener('focus', function() {
const box = document.getElementById('descriptionBoxAfterCommands');
box.style.top = this.getBoundingClientRect().top + window.scrollY + 30 + 'px'; // Adjusted position
box.classList.add('visible');
});
document.getElementById('no').addEventListener('blur', function() {
document.getElementById('descriptionBoxAfterCommands').classList.remove('visible');
});
document.getElementById('banWhitelistInput').addEventListener('focus', function() {
const box = document.getElementById('descriptionBoxBanWhitelist');
box.style.top = this.getBoundingClientRect().top + window.scrollY + 30 + 'px'; // Adjusted position
box.classList.add('visible');
});
document.getElementById('banWhitelistInput').addEventListener('blur', function() {
document.getElementById('descriptionBoxBanWhitelist').classList.remove('visible');
});
document.getElementById('messagesInput').addEventListener('focus', function() {
const box = document.getElementById('descriptionBoxMessages');
box.style.top = this.getBoundingClientRect().top + window.scrollY + 30 + 'px'; // Adjusted position
box.classList.add('visible');
});
document.getElementById('messagesInput').addEventListener('blur', function() {
document.getElementById('descriptionBoxMessages').classList.remove('visible');
});
document.getElementById('webhookContentInput').addEventListener('focus', function() {
const box = document.getElementById('descriptionBoxWebhookContent');
box.style.top = this.getBoundingClientRect().top + window.scrollY + 30 + 'px'; // Adjusted position
box.classList.add('visible');
});
document.getElementById('webhookContentInput').addEventListener('blur', function() {
document.getElementById('descriptionBoxWebhookContent').classList.remove('visible');
});
document.getElementById('webhookPicturesInput').addEventListener('focus', function() {
const box = document.getElementById('descriptionBoxWebhookPictures');
box.style.top = this.getBoundingClientRect().top + window.scrollY + 30 + 'px'; // Adjusted position
box.classList.add('visible');
});
document.getElementById('webhookPicturesInput').addEventListener('blur', function() {
document.getElementById('descriptionBoxWebhookPictures').classList.remove('visible');
});
document.getElementById('webhookUsernamesInput').addEventListener('focus', function() {
const box = document.getElementById('descriptionBoxWebhookUsernames');
box.style.top = this.getBoundingClientRect().top + window.scrollY + 30 + 'px'; // Adjusted position
box.classList.add('visible');
});
document.getElementById('webhookUsernamesInput').addEventListener('blur', function() {
document.getElementById('descriptionBoxWebhookUsernames').classList.remove('visible');
});
document.getElementById('webhookMessageAmountInput').addEventListener('focus', function() {
const box = document.getElementById('descriptionBoxWebhookMessageAmount');
box.style.top = this.getBoundingClientRect().top + window.scrollY + 30 + 'px'; // Adjusted position
box.classList.add('visible');
});
document.getElementById('webhookMessageAmountInput').addEventListener('blur', function() {
document.getElementById('descriptionBoxWebhookMessageAmount').classList.remove('visible');
});
document.getElementById('token').addEventListener('focus', function() {
const box = document.getElementById('descriptionBoxToken');
box.style.top = this.getBoundingClientRect().top + window.scrollY + 30 + 'px'; // Adjusted position
box.classList.add('visible');
});
document.getElementById('token').addEventListener('blur', function() {
document.getElementById('descriptionBoxToken').classList.remove('visible');
});
document.getElementById('darkModeSwitch').addEventListener('change', function() {
document.body.classList.toggle('dark-mode', this.checked);
document.body.classList.toggle('light-mode', !this.checked);
const modeText = document.getElementById('modeText');
modeText.textContent = this.checked ? 'Switch to Light Mode' : 'Switch to Dark Mode';
closeOutput();
});
let statustrue = false;
let nicktrue = false;
function generateConfig() {
const form = document.getElementById('configForm');
if (!form.token.value.trim() || !document.getElementById('permissionsList').children.length) {
alert("Please fill out the Bot Token and User Permissions ID fields.");
return;
}
const permissions = Array.from(document.getElementById('permissionsList').children).map(item => item.children[1].textContent.trim());
const afterCommands = Array.from(document.getElementById('afterCommandsList').children).map(item => item.children[1].textContent.trim());
const banWhitelist = Array.from(document.getElementById('banWhitelistList').children).map(item => item.children[1].textContent.trim());
const messages = Array.from(document.getElementById('messagesList').children).map(item => item.children[1].textContent.trim());
const webhookContent = Array.from(document.getElementById('webhookContentList').children).map(item => item.children[1].textContent.trim());
let webhookPictures = Array.from(document.getElementById('webhookPicturesList').children).map(item => item.children[1].textContent.trim());
const webhookUsernames = Array.from(document.getElementById('webhookUsernamesList').children).map(item => item.children[1].textContent.trim());
// Remove null values if there are other values in webhookPictures
if (webhookPictures.length > 1) {
webhookPictures = webhookPictures.filter(picture => picture !== null);
}
const addChannel = document.getElementById('addChannelList') ? Array.from(document.getElementById('addChannelList').children).map(item => `addChannel ${item.children[1].textContent.trim()}`) : [];
const addVoiceChannel = document.getElementById('addVoiceChannelList') ? Array.from(document.getElementById('addVoiceChannelList').children).map(item => `addVoiceChannel ${item.children[1].textContent.trim()}`) : [];
const ban = document.getElementById('banList') ? Array.from(document.getElementById('banList').children).map(item => `ban ${item.children[1].textContent.trim()}`) : [];
const unban = document.getElementById('unbanList') ? Array.from(document.getElementById('unbanList').children).map(item => `unban ${item.children[1].textContent.trim()}`) : [];
const channelBomb = document.getElementById('channelBombList') ? Array.from(document.getElementById('channelBombList').children).map(item => {
const value = item.children[1] ? item.children[1].textContent.trim() : '';
return value ? `channelBomb ${value} fixed` : `channelBomb ${value}`;
}) : [];
const categoryBomb = document.getElementById('categoryBombList') ? Array.from(document.getElementById('categoryBombList').children).map(item => {
const value = item.children[1] ? item.children[1].textContent.trim() : '';
return value ? `categoryBomb ${value} fixed` : `categoryBomb ${value}`;
}) : [];
const roleBomb = document.getElementById('roleBombList') ? Array.from(document.getElementById('roleBombList').children).map(item => {
const value = item.children[1] ? item.children[1].textContent.trim() : '';
return value ? `roleBomb ${value} fixed` : `roleBomb ${value}`;
}) : [];
const bestRole = document.getElementById('bestRoleList') ? Array.from(document.getElementById('bestRoleList').children).map(item => `bestRole ${item.children[1].textContent.trim()}`) : [];
const serverName = document.getElementById('serverNameList') ? Array.from(document.getElementById('serverNameList').children).map(item => `serverName ${item.children[1].textContent.trim()}`) : [];
const serverIcon = document.getElementById('serverIconList') ? Array.from(document.getElementById('serverIconList').children).map(item => `serverIcon ${item.children[1].textContent.trim()}`) : [];
let activeCommands = [
...unban, ...bestRole,
...serverName, ...serverIcon, ...addVoiceChannel,
...channelBomb, ...categoryBomb, ...roleBomb, ...addChannel, ...ban, ...(statustrue ? ['autoStatus'] : []),
...(nicktrue ? ['autoNick'] : []),
].filter(command => {
const commandType = command.split(' ')[0];
const input = document.getElementById(`${commandType}Input`);
const toggleBtn = input ? input.nextElementSibling : null;
return toggleBtn && toggleBtn.classList.contains('active');
});
// Handle specific commands with toggle buttons
const specificCommands = ['autoStatus', 'autoNick','serverName','serverIcon','channelBomb', 'categoryBomb', 'roleBomb'];
specificCommands.forEach(command => {
const input = document.getElementById(`${command}Input`);
const toggleBtn = input ? input.nextElementSibling : null;
if (toggleBtn && toggleBtn.classList.contains('active')) {
activeCommands.push(`${command} ${input.value.trim()}`);
}
});
activeCommands = [
...unban,
...bestRole,
...addVoiceChannel,
...(statustrue ? ['autoStatus'] : []),
...(nicktrue ? ['autoNick'] : []),
...serverName,
...serverIcon,
...channelBomb,
...categoryBomb,
...roleBomb,
...addChannel,
...ban
];
activeCommands = [
...unban, ...bestRole,
...(statustrue ? ['autoStatus'] : []),
...(nicktrue ? ['autoNick'] : []),
...serverName, ...serverIcon, ...addVoiceChannel,
...channelBomb, ...categoryBomb, ...roleBomb, ...addChannel, ...ban,
...specificCommands.map(command => {
const input = document.getElementById(`${command}Input`);
return input ? `${command} ${input.value.trim()}` : '';
}).filter(command => command)
].filter(command => {
const commandType = command.split(' ')[0];
const input = document.getElementById(`${commandType}Input`);
const toggleBtn = input ? input.nextElementSibling : null;
return toggleBtn && toggleBtn.classList.contains('active');
});
const config = {
token: form.token.value.trim(),
permissions: permissions,
bot_permission: "2147483647",
command_prefix: ".", // Default command prefix
bot_status: form.status.value || "offline",
verbose: 15,
bomb_messages: {},
webhook_spam: {},
after: [
...activeCommands
],
proxies: [],
ban_whitelist: banWhitelist
};