-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathhelp.py
More file actions
1107 lines (910 loc) · 47.9 KB
/
Copy pathhelp.py
File metadata and controls
1107 lines (910 loc) · 47.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import discord
from discord.ext import commands
import asyncio
import json
import random
black = "\033[30m"
red = "\033[31m"
green = "\033[32m"
yellow = "\033[33m"
blue = "\033[34m"
magenta = "\033[35m"
cyan = "\033[36m"
white = "\033[37m"
reset = "\033[0m"
pink = "\033[38;2;255;192;203m"
white = "\033[37m"
blue = "\033[34m"
black = "\033[30m"
light_green = "\033[92m"
light_yellow = "\033[93m"
light_magenta = "\033[95m"
light_cyan = "\033[96m"
light_blue = "\033[94m"
batman_quotes = [
"I am vengeance. I am the night.",
"It's not who I am underneath, but what I do that defines me.",
"Why do we fall? So we can learn to pick ourselves up.",
"Sometimes the truth isn't good enough.",
"The night is darkest just before the dawn.",
"You either die a hero or live long enough to see yourself become the villain.",
"I have one power. I never give up.",
"Everything's impossible until somebody does it.",
"A hero can be anyone.",
"Fear is a tool. They think I'm hiding in the shadows.",
"I am the shadows.",
"Criminals are like weeds, Alfred. Pull one up, another grows in its place.",
"It's what I do that defines me.",
"Sometimes people deserve to have their faith rewarded."
]
batmans = f"""
{black}
⠀⠀⠀⠀⠀⠀⠀⡆⠀⠀⠀⠀⠀⠀⠀⢂⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢰⡇⠀⠀⠀⠀⠀⠀⠀⣸⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⣼⣷⠀⣀⣀⣀⡄⠀⣀⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⣿⣿⣿⡿⢋⠁⠀⠀⠀⠈⠑⡄⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⢠⣿⣿⣿⣷⡿⠂⠄⢀⠀⠀⢠⠽⡄⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⢸⣿⣿⣿⡏⠠⣴⢦⣤⣬⣧⡭⣶⡇⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⢸⣿⣿⣿⣄⠀⠈⠉⠕⠉⢿⣿⣽⣱⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⡆⠐⠒⠂⠖⠉⢉⣍⣥⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⢰⣿⣿⣿⣿⡈⠆⠀⠰⣖⠈⠔⠲⢱⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⣼⣿⣿⣿⡻⣷⣄⡀⠁⠀⠀⠀⣀⡼⠀⠀⠀⠀⠀⠀
⠀⠀⣀⣤⣾⣿⣿⣿⣿⣿⣷⣄⠙⢻⣿⠿⣿⣿⠉⠀⠀⠀⠀⠀⠀⠀
⢤⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⠀⠙⠀⣿⠇⠀⣀⣀⠀⠀⠀⠀⠀
⠀⠛⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠳⣄⢠⣿⣶⣷⣗⡫⠿⠇⢀⠀⠀
⠀⠀⠈⢫⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀⠘⠋⠁⠀⣿⣿⣿⣿⣶⣦⡁⠀
⠀⠀⠀⠀⠙⢛⣻⢿⣿⣿⣷⠶⢶⣦⣀⡰⠾⣿⣿⣿⣿⣿⡿⡿⠂
⠀⠀⠀⠙⠛⠒⠶⢭⣟⢋⢔⣿⣿⣰⣼⣸⣿⣪⣿⣿⣿⣿⡿⠞⠁⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠙⣾⡼⣟⠙⠹⠿⠙⣻⣿⡿⠋⠋⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⣑⣁⡒⢒⠒⠚⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
"""
def load_config(file_path='config.json'):
try:
with open(file_path, 'r') as f:
return json.load(f)
except FileNotFoundError:
default_config = {"password": "1234"}
with open(file_path, 'w') as f:
json.dump(default_config, f, indent=4)
return default_config
class HelpCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.config = load_config()
self.help_session_active = False
self.help_timeout_task = None
self.settings = self.load_settings()
self.favorites_data = self.load_favorites()
self.commands_data = self.load_commands()
self.header_msg = None
self.content_msg = None
self.footer_msg = None
def load_settings(self):
try:
with open('settings.json', 'r') as f:
return json.load(f)
except FileNotFoundError:
default_settings = {
"password": "1234",
"prefix": "$",
"help_timeout": 80,
"delete_timeout": 5,
"theme": {
"primary_color": "black",
"secondary_color": "white",
"accent_color": "red"
}
}
with open('settings.json', 'w') as f:
json.dump(default_settings, f, indent=4)
return default_settings
def load_favorites(self):
try:
with open('favorites.json', 'r') as f:
return json.load(f)
except FileNotFoundError:
default_favorites = {
"favorites": [],
"pinned_commands": [],
"command_notes": {},
"custom_aliases": {},
"command_stats": {},
"favorite_categories": [],
"category_pins": {}
}
with open('favorites.json', 'w') as f:
json.dump(default_favorites, f, indent=4)
return default_favorites
def load_commands(self):
try:
with open('commands.json', 'r') as f:
return json.load(f)
except FileNotFoundError:
return {}
def save_settings(self):
with open('settings.json', 'w') as f:
json.dump(self.settings, f, indent=4)
def save_favorites(self):
with open('favorites.json', 'w') as f:
json.dump(self.favorites_data, f, indent=4)
async def reload_data(self):
self.settings = self.load_settings()
self.favorites_data = self.load_favorites()
self.commands_data = self.load_commands()
async def check_password(self, ctx):
if not self.settings['password']:
await ctx.send("Please enter the security key using `$verify <key>`")
return False
return True
async def get_command_help(self, command: str):
command = command.lower()
for category in self.commands_data.values():
if command in category:
return f"```{command}: {category[command]}```"
return "```Command help not available```"
@commands.command(name="menu")
async def menu(self, ctx):
if not await self.check_password(ctx):
return
try:
await self.header_msg.edit(content=self.original_header)
await self.content_msg.edit(content=self.original_content)
await self.footer_msg.edit(content=self.original_footer)
except (discord.NotFound, AttributeError):
self.header_msg = await ctx.send(self.original_header)
self.content_msg = await ctx.send(self.original_content)
self.footer_msg = await ctx.send(self.original_footer)
self.help_session_active = True
await self.reset_timeout()
async def show_help(self, ctx, user: discord.User = None):
if not await self.check_password(ctx):
return
if self.help_timeout_task:
self.help_timeout_task.cancel()
self.help_session_active = True
user = ctx.author
menu_items = [f"{black}[{white}1{black}] {white}Favorites"]
remaining_items = [
"Chatpacking",
"Token Utility",
"User Utility",
"Pc Utility",
"Nuker",
"Etc",
"Event Reactions",
"Profile",
"Anti Gc",
"Message Events",
"Favorites Help",
"Anti Token",
"Token Controller",
"OwO Hunt",
"Nuke",
"Protection",
"Voice"
]
favorite_items = []
normal_items = []
for item in remaining_items:
if item.lower() in [cat.lower() for cat in self.favorites_data["favorite_categories"]]:
favorite_items.append(item)
else:
normal_items.append(item)
start_num = 2
for item in favorite_items:
menu_items.append(f"{black}[{white}{start_num}{black}] {white}★ {item}")
start_num += 1
for item in normal_items:
menu_items.append(f"{black}[{white}{start_num}{black}] {white}{item}")
start_num += 1
self.original_header = f"```ansi\n🦇 {black}Batman 🦇 {black}[ {red}$close - Close Menu {black}] {black}[ {red}$reset - Reset Menu {black}]```"
self.original_content = f"""```ansi
{chr(10).join(menu_items)}
{black}[{white}Choose{black}] {white}$1 - {start_num-1}
{black}Welcome {red}{user.display_name}```"""
self.original_footer = f"```ansi\n ⠀⠀⠀⠀⠀{black}i am vengeance.```"
startup_header = f"```ansi\n{white}🦇 Welcome to {black}Batman{white} 🦇 {black}[ {white}Press {red}$menu{white} to continue {black}]```"
startup_content = f"```ansi\n{batmans}```"
startup_footer = f"```ansi\n ⠀⠀⠀⠀⠀BATMAN x SOCIAL x LAPPY```"
self.header_msg = await ctx.send(startup_header)
self.content_msg = await ctx.send(startup_content)
self.footer_msg = await ctx.send(startup_footer)
self.help_timeout_task = asyncio.create_task(self.help_timeout())
async def help_timeout(self):
await asyncio.sleep(self.settings['help_timeout'])
self.help_session_active = False
async def reset_timeout(self):
if self.help_timeout_task:
self.help_timeout_task.cancel()
self.help_timeout_task = asyncio.create_task(self.help_timeout())
async def end_help(self, ctx):
if not await self.check_password(ctx):
return
if self.help_timeout_task:
self.help_timeout_task.cancel()
self.help_session_active = False
await ctx.send("```Help session terminated```")
async def chatpacking(self, ctx, user: discord.User = None):
await self.safe_delete(ctx)
if not self.help_session_active:
return
pinned_commands = self.favorites_data.get("category_pins", {}).get("chatpacking", [])
pinned_content = ""
if pinned_commands:
pinned_content = f"{black}Pinned Commands:\n" + "\n".join(f"{black}[{white}★{black}] {white}{cmd}" for cmd in pinned_commands) + "\n\n"
commands = [
"gcfill", "gcleave", "autofill (wip)", "autofillend", "death", "deathend",
"untouchable", "untouchableend", "gcss", "gcssend", "kill", "ar", "arend",
"ar2", "ar2end", "outlast", "outlaststop", "ugc", "ugcend", "testimony", "testimonyoff"
]
numbered_commands = [cmd for cmd in commands if cmd not in pinned_commands]
numbered_content = "\n".join(f"{black}[{white}{i+1}{black}] {white}{cmd}" for i, cmd in enumerate(numbered_commands))
await self.header_msg.edit(content=f"```ansi\n{black}[ {red}$close - Close Menu {black}] 🦇 {black}CHATPACKING 🦇 [ {red}$reset - Reset Menu {black}]```")
await self.content_msg.edit(content=f"""```ansi
{pinned_content}{numbered_content}```""")
await self.footer_msg.edit(content=f"```ansi\n ⠀⠀⠀⠀⠀{black}i am the night.```")
async def token_utility(self, ctx, user: discord.User = None):
await self.safe_delete(ctx)
if not self.help_session_active:
return
pinned_commands = self.favorites_data.get("category_pins", {}).get("token utility", [])
pinned_content = ""
if pinned_commands:
pinned_content = f"{black}Pinned Commands:\n" + "\n".join(f"{black}[{white}★{black}] {white}{cmd}" for cmd in pinned_commands) + "\n\n"
commands = [
"tnickanme", "tpronouns", "tbio", "tpfp", "tstatus", "tstatusoff",
"tinfo", "tok", "richtok", "tjoin", "tleave", "rpcall", "mreact",
"maltreact", "mreactend", "maltreactend"
]
numbered_commands = [cmd for cmd in commands if cmd not in pinned_commands]
numbered_content = "\n".join(f"{black}[{white}{i+1}{black}] {white}{cmd}" for i, cmd in enumerate(numbered_commands))
await self.header_msg.edit(content=f"```ansi\n{black}[ {red}$close - Close Menu {black}] 🦇 {black}TOKEN UTILITY 🦇 [ {red}$reset - Reset Menu {black}]```")
await self.content_msg.edit(content=f"""```ansi
{pinned_content}{numbered_content}```""")
await self.footer_msg.edit(content=f"```ansi\n ⠀⠀⠀⠀⠀ {black}i am.. BATMAN```")
async def user_utility(self, ctx, user: discord.User = None):
await self.safe_delete(ctx)
if not self.help_session_active:
return
pinned_commands = self.favorites_data.get("category_pins", {}).get("user utility", [])
pinned_content = ""
if pinned_commands:
pinned_content = f"{black}Pinned Commands:\n" + "\n".join(f"{black}[{white}★{black}] {white}{cmd}" for cmd in pinned_commands) + "\n\n"
commands = [
"autoreact", "autoreactend", "altreact", "altreactend", "nickloop",
"stopnickloop", "autobump", "autobumpoff", "block", "unblock",
"onstartrpc", "rpc"
]
numbered_commands = [cmd for cmd in commands if cmd not in pinned_commands]
numbered_content = "\n".join(f"{black}[{white}{i+1}{black}] {white}{cmd}" for i, cmd in enumerate(numbered_commands))
await self.header_msg.edit(content=f"```ansi\n{black}[ {red}$close - Close Menu {black}] 🦇 {black}USER UTILITY 🦇 [ {red}$reset - Reset Menu {black}]```")
await self.content_msg.edit(content=f"""```ansi
{pinned_content}{numbered_content}```""")
await self.footer_msg.edit(content=f"```ansi\n ⠀⠀⠀⠀⠀ {black}I'm not a hero, I'm a symbol.```")
async def pc_utility(self, ctx, user: discord.User = None):
await self.safe_delete(ctx)
if not self.help_session_active:
return
pinned_commands = self.favorites_data.get("category_pins", {}).get("pc utility", [])
pinned_content = ""
if pinned_commands:
pinned_content = f"{black}Pinned Commands:\n" + "\n".join(f"{black}[{white}★{black}] {white}{cmd}" for cmd in pinned_commands) + "\n\n"
commands = [
"ss", "sspaste", "cleartemp", "clearbin", "recordtime", "record",
"recordpaste", "vmr", "voicetime", "voicemessage", "audior",
"audiotime", "audiopaste"
]
numbered_commands = [cmd for cmd in commands if cmd not in pinned_commands]
numbered_content = "\n".join(f"{black}[{white}{i+1}{black}] {white}{cmd}" for i, cmd in enumerate(numbered_commands))
await self.header_msg.edit(content=f"```ansi\n{black}[ {red}$close - Close Menu {black}] 🦇 {black}PC UTILITY 🦇 [ {red}$reset - Reset Menu {black}]```")
await self.content_msg.edit(content=f"""```ansi
{pinned_content}{numbered_content}```""")
await self.footer_msg.edit(content=f"```ansi\n ⠀⠀⠀⠀⠀ {black}The night is mine.```")
async def nuker(self, ctx, user: discord.User = None):
await self.safe_delete(ctx)
if not self.help_session_active:
return
pinned_commands = self.favorites_data.get("category_pins", {}).get("nuker", [])
pinned_content = ""
if pinned_commands:
pinned_content = f"{black}Pinned Commands:\n" + "\n".join(f"{black}[{white}★{black}] {white}{cmd}" for cmd in pinned_commands) + "\n\n"
commands = ["massrole", "massroledel", "masschannel"]
numbered_commands = [cmd for cmd in commands if cmd not in pinned_commands]
numbered_content = "\n".join(f"{black}[{white}{i+1}{black}] {white}{cmd}" for i, cmd in enumerate(numbered_commands))
await self.header_msg.edit(content=f"```ansi\n{black}[ {red}$close - Close Menu {black}] 🦇 {black}KNIGHTFALL 🦇 [ {red}$reset - Reset Menu {black}]```")
await self.content_msg.edit(content=f"""```ansi
{pinned_content}{numbered_content}```""")
await self.footer_msg.edit(content=f"```ansi\n ⠀⠀⠀⠀⠀ {black}I will not fail you.```")
async def etc(self, ctx, user: discord.User = None):
await self.safe_delete(ctx)
if not self.help_session_active:
return
pinned_commands = self.favorites_data.get("category_pins", {}).get("etc", [])
pinned_content = ""
if pinned_commands:
pinned_content = f"{black}Pinned Commands:\n" + "\n".join(f"{black}[{white}★{black}] {white}{cmd}" for cmd in pinned_commands) + "\n\n"
commands = [
"cls", "swat", "rape", "host", "hostlaunch", "hosttoksclear", "hosttok"
]
numbered_commands = [cmd for cmd in commands if cmd not in pinned_commands]
numbered_content = "\n".join(f"{black}[{white}{i+1}{black}] {white}{cmd}" for i, cmd in enumerate(numbered_commands))
await self.header_msg.edit(content=f"```ansi\n{black}[ {red}$close - Close Menu {black}] 🦇 {black}ETC 🦇 [ {red}$reset - Reset Menu {black}]```")
await self.content_msg.edit(content=f"""```ansi
{pinned_content}{numbered_content}```""")
await self.footer_msg.edit(content=f"```ansi\n ⠀⠀⠀⠀⠀ {black}I am the shadow.```")
async def event_reactions(self, ctx, user: discord.User = None):
await self.safe_delete(ctx)
if not self.help_session_active:
return
pinned_commands = self.favorites_data.get("category_pins", {}).get("event reactions", [])
pinned_content = ""
if pinned_commands:
pinned_content = f"{black}Pinned Commands:\n" + "\n".join(f"{black}[{white}★{black}] {white}{cmd}" for cmd in pinned_commands) + "\n\n"
commands = ["eonmessage", "ronping", "sonping", "keywordr", "reactkw"]
numbered_commands = [cmd for cmd in commands if cmd not in pinned_commands]
numbered_content = "\n".join(f"{black}[{white}{i+1}{black}] {white}{cmd}" for i, cmd in enumerate(numbered_commands))
await self.header_msg.edit(content=f"```ansi\n{black}[ {red}$close - Close Menu {black}] 🦇 {black}EVENT REACTIONS 🦇 [ {red}$reset - Reset Menu {black}]```")
await self.content_msg.edit(content=f"""```ansi
{pinned_content}{numbered_content}```""")
await self.footer_msg.edit(content=f"```ansi\n ⠀⠀⠀⠀⠀ {black}Vengeance has purpose.```")
async def profile_menu(self, ctx):
await self.safe_delete(ctx)
user = ctx.author
pinned_commands = self.favorites_data.get("category_pins", {}).get("profile", [])
pinned_content = ""
if pinned_commands:
pinned_content = f"{black}Pinned Commands:\n" + "\n".join(f"{black}[{white}★{black}] {white}{cmd}" for cmd in pinned_commands) + "\n\n"
commands = [
"setpfp", "setbanner", "setbio", "setpronoun", "setname",
"stealbio", "stealpronoun", "stealpfp", "stealbanner"
]
numbered_commands = [cmd for cmd in commands if cmd not in pinned_commands]
numbered_content = "\n".join(f"{black}[{white}{i+1}{black}] {white}{cmd}" for i, cmd in enumerate(numbered_commands))
await self.header_msg.edit(content=f"```ansi\n{black}[ {red}$close - Close Menu {black}] 🦇 {black}PROFILE CUSTOMIZATION 🦇 [ {red}$reset - Reset Menu {black}]```")
await self.content_msg.edit(content=f"""```ansi
{pinned_content}{numbered_content}```""")
await self.footer_msg.edit(content=f"```ansi\n ⠀⠀⠀⠀⠀ {black}I protect the innocent.```")
async def groupchat_menu(self, ctx):
await self.safe_delete(ctx)
user = ctx.author
pinned_commands = self.favorites_data.get("category_pins", {}).get("groupchat", [])
pinned_content = ""
if pinned_commands:
pinned_content = f"{black}Pinned Commands:\n" + "\n".join(f"{black}[{white}★{black}] {white}{cmd}" for cmd in pinned_commands) + "\n\n"
commands = [
"mimic", "antigcspam", "antigcspam whitelist", "antigcspam blacklist",
"antigcspam silent", "antigcspam message", "antigcspam autoremove",
"antigcspam webhook", "antigcspam autoblock", "antigcspam list",
"autogc", "autogc stop", "autogc whitelist", "autogc whitelistr",
"autogc list", "autogcleave", "autogcleave stop", "autogcleave status"
]
numbered_commands = [cmd for cmd in commands if cmd not in pinned_commands]
numbered_content = "\n".join(f"{black}[{white}{i+1}{black}] {white}{cmd}" for i, cmd in enumerate(numbered_commands))
await self.header_msg.edit(content=f"```ansi\n[ {red}$close - Close Menu {black}] 🦇 {black}GROUPCHAT 🦇 [ {red}$reset - Reset Menu {black}]```")
await self.content_msg.edit(content=f"""```ansi
{pinned_content}{numbered_content}```""")
await self.footer_msg.edit(content=f"```ansi\n ⠀⠀⠀⠀⠀ {black}I make my own rules.```")
async def auto_messenger_menu(self, ctx):
await self.safe_delete(ctx)
user = ctx.author
pinned_commands = self.favorites_data.get("category_pins", {}).get("auto messenger", [])
pinned_content = ""
if pinned_commands:
pinned_content = f"{black}Pinned Commands:\n" + "\n".join(f"{black}[{white}★{black}] {white}{cmd}" for cmd in pinned_commands) + "\n\n"
commands = [
"msgtime help", "msgtime <minutes> <message(s)> on", "msgtime off",
"msgtime status", "msgtime list", "msgtime clear", "msgtime remove",
"purgekw <keyword>", "purgekwdm <keyword>", "purgekwserver <keyword>", "afk"
]
numbered_commands = [cmd for cmd in commands if cmd not in pinned_commands]
numbered_content = "\n".join(f"{black}[{white}{i+1}{black}] {white}{cmd}" for i, cmd in enumerate(numbered_commands))
await self.header_msg.edit(content=f"```ansi\n[ {red}$close - Close Menu {black}] 🦇 {black}AUTO MESSENGER 🦇 [ {red}$reset - Reset Menu {black}]```")
await self.content_msg.edit(content=f"""```ansi
{pinned_content}{numbered_content}```""")
await self.footer_msg.edit(content=f"```ansi\n ⠀⠀⠀⠀⠀ {black}Fear is a tool.```")
async def show_favorites_help(self, ctx):
if not self.help_session_active:
return
try:
await self.header_msg.edit(content=f"```ansi\n{black}[ {red}$close - Close Menu {black}] 🦇 {black}FAVORITES HELP 🦇 [ {red}$reset - Reset Menu {black}]```")
await self.content_msg.edit(content=f"""```ansi
{black}[{white}1{black}] {white}$fav
{black}[{white}2{black}] {white}$fav add
{black}[{white}3{black}] {white}$fav remove
{black}[{white}4{black}] {white}$fav pin
{black}[{white}5{black}] {white}$fav unpin
{black}[{white}6{black}] {white}$fav alias
{black}[{white}7{black}] {white}$fav unalias
{black}[{white}8{black}] {white}$fav category
{black}[{white}9{black}] {white}$fav uncategory
{black}[{white}10{black}] {white}$fav stats
{black}[{white}Features{black}]
{white}Pin important commands to top
{white}Add custom notes to remember command usage
{white}Create aliases for quick access
{white}Track command usage statistics
{white}Organize favorites into categories
{white}View all favorites with $fav```""")
await self.footer_msg.edit(content=f"```ansi\n ⠀⠀⠀⠀⠀ {black}Knowledge is power.```")
except (discord.NotFound, AttributeError):
await self.menu(ctx)
await self.show_favorites_help(ctx)
async def show_favorites_menu(self, ctx):
if not self.help_session_active:
return
try:
content = []
for category in self.favorites_data.get("favorite_categories", []):
content.append(f"{black}[{white}{category.title()}{black}] {white}★ Favorite Category")
await self.header_msg.edit(content=f"```ansi\n🦇 {black}Favorites 🦇 {black}[ {red}$menu - Return to Menu {black}]```")
await self.content_msg.edit(content=f"""```ansi
{chr(10).join(content) if content else f"{black}No favorite categories yet. Add some with $fav category <category>"}```""")
await self.footer_msg.edit(content=f"```ansi\n ⠀⠀⠀⠀⠀ {black}My favorites never fail.```")
except (discord.NotFound, AttributeError):
await self.menu(ctx)
await self.show_favorites_menu(ctx)
async def add_favorite(self, ctx, command: str, note: str = None):
command = command.lower()
if command not in self.favorites_data["favorites"]:
self.favorites_data["favorites"].append(command)
if note:
self.favorites_data["command_notes"][command] = note
if command not in self.favorites_data["command_stats"]:
self.favorites_data["command_stats"][command] = {"times_used": 0, "added_date": str(ctx.message.created_at)}
self.save_favorites()
await ctx.send(f"```Added {command} to favorites```")
else:
await ctx.send(f"```{command} is already in favorites```")
async def remove_favorite(self, ctx, command: str):
command = command.lower()
if command in self.favorites_data["favorites"]:
self.favorites_data["favorites"].remove(command)
if command in self.favorites_data["command_notes"]:
del self.favorites_data["command_notes"][command]
self.save_favorites()
await ctx.send(f"```Removed {command} from favorites```")
else:
await ctx.send(f"```{command} is not in favorites```")
async def pin_command(self, ctx, command: str):
if command not in self.favorites_data.get("favorites", []):
await ctx.send("Command must be in favorites before it can be pinned.")
return
if "pinned_commands" not in self.favorites_data:
self.favorites_data["pinned_commands"] = []
if command in self.favorites_data["pinned_commands"]:
self.favorites_data["pinned_commands"].remove(command)
await ctx.send(f"Unpinned {command}")
else:
self.favorites_data["pinned_commands"].append(command)
await ctx.send(f"Pinned {command}")
self.save_favorites()
await self.reset_timeout()
async def add_alias(self, ctx, command: str, alias: str):
command = command.lower()
alias = alias.lower()
if command in self.favorites_data["favorites"]:
self.favorites_data["custom_aliases"][alias] = command
self.save_favorites()
await ctx.send(f"```Added alias {alias} for {command}```")
async def remove_alias(self, ctx, alias: str):
alias = alias.lower()
if alias in self.favorites_data["custom_aliases"]:
del self.favorites_data["custom_aliases"][alias]
self.save_favorites()
await ctx.send(f"```Removed alias {alias}```")
async def add_category(self, ctx, category: str):
if category not in self.favorites_data["favorite_categories"]:
self.favorites_data["favorite_categories"].append(category)
self.save_favorites()
await ctx.send(f"```Added {category} to favorite categories```")
async def remove_category(self, ctx, category: str):
if category in self.favorites_data["favorite_categories"]:
self.favorites_data["favorite_categories"].remove(category)
self.save_favorites()
await ctx.send(f"```Removed {category} from favorite categories```")
@commands.command()
async def fav(self, ctx, action: str = None, *args):
if not await self.check_password(ctx):
return
if not action:
await self.show_favorites_menu(ctx)
return
action = action.lower()
if action == "help":
await self.show_favorites_help(ctx)
elif action == "add":
if not args:
await ctx.send("Please specify a command to add.")
return
command = args[0]
note = " ".join(args[1:]) if len(args) > 1 else None
await self.add_favorite(ctx, command, note)
elif action == "remove":
if not args:
await ctx.send("Please specify a command to remove.")
return
await self.remove_favorite(ctx, args[0])
elif action == "category":
if not args:
await ctx.send("Please specify a category.")
return
await self.add_category(ctx, args[0])
elif action == "pin":
if not args:
await ctx.send("Please specify a command to pin.")
return
await self.pin_command(ctx, args[0])
elif action == "note":
if len(args) < 2:
await ctx.send("Please specify a command and note.")
return
command = args[0]
note = " ".join(args[1:])
await self.add_note(ctx, command, note)
elif action == "alias":
if len(args) < 2:
await ctx.send("Please specify an alias and command.")
return
alias = args[0]
command = args[1]
await self.add_alias(ctx, alias, command)
else:
await ctx.send("Invalid action. Use $fav help to see available actions.")
async def show_favorite_stats(self, ctx):
stats = []
for cmd in sorted(self.favorites_data["favorites"]):
cmd_stats = self.favorites_data["command_stats"].get(cmd, {})
times_used = cmd_stats.get('times_used', 0)
added_date = cmd_stats.get('added_date', 'Unknown')
pinned = "🦇" if cmd in self.favorites_data["pinned_commands"] else ""
stats.append(f"```ansi\n{black}[{white}{cmd}{black}] {white}{pinned}\n {black}Used: {white}{times_used} times\n {black}Added: {white}{added_date}```")
if not stats:
await ctx.send("```No favorite commands statistics available```")
return
await ctx.send("\n".join(stats))
async def reset_help(self, ctx):
if not await self.check_password(ctx):
return
if not self.help_session_active:
return
user = ctx.author
await self.header_msg.edit(content=self.original_header)
await self.content_msg.edit(content=self.original_content)
await self.footer_msg.edit(content=self.original_footer)
await self.reset_timeout()
async def close_help(self, ctx):
if not await self.check_password(ctx):
return
if not self.help_session_active:
return
if self.help_timeout_task:
self.help_timeout_task.cancel()
self.help_session_active = False
await self.header_msg.delete()
await self.content_msg.delete()
await self.footer_msg.delete()
self.header_msg = None
self.content_msg = None
self.footer_msg = None
@commands.command()
async def reset(self, ctx):
await self.safe_delete(ctx)
await self.reset_help(ctx)
@commands.command()
async def close(self, ctx):
await self.safe_delete(ctx)
await self.close_help(ctx)
async def safe_delete(self, ctx):
try:
await ctx.message.delete()
except (discord.NotFound, AttributeError):
pass
async def show_category(self, ctx, category: str):
if not self.help_session_active:
return
try:
await self.reload_data()
category = category.lower()
if category not in self.commands_data:
await ctx.send("```Category not found.```")
return
content = []
category_pins = self.favorites_data.get("category_pins", {}).get(category, [])
for cmd in category_pins:
if cmd in self.commands_data[category]:
desc = self.commands_data[category][cmd]
content.append(f"{black}[{white}★{black}] {white}{cmd} {black}- {white}{desc}")
num = 1
for cmd, desc in self.commands_data[category].items():
if cmd not in category_pins:
content.append(f"{black}[{white}{num}{black}] {white}{cmd} {black}- {white}{desc}")
num += 1
await self.header_msg.edit(content=f"```ansi\n🦇 {black}{category.title()} 🦇 {black}[ {red}$menu - Return to Menu {black}]```")
await self.content_msg.edit(content=f"""```ansi
{chr(10).join(content)}```""")
await self.footer_msg.edit(content=f"```ansi\n ⠀⠀⠀⠀⠀{black}i am the shadows.```")
except (discord.NotFound, AttributeError):
await self.menu(ctx)
await self.show_category(ctx, category)
async def owohunt_menu(self, ctx):
await self.safe_delete(ctx)
if not self.help_session_active:
return
pinned_commands = self.favorites_data.get("category_pins", {}).get("owo hunt", [])
pinned_content = ""
if pinned_commands:
pinned_content = f"{black}Pinned Commands:\n" + "\n".join(f"{black}[{white}★{black}] {white}{cmd}" for cmd in pinned_commands) + "\n\n"
commands = [
"autohunt",
"autohunt stop",
"autohunt settings",
"autohunt set hunt_min <seconds>",
"autohunt set hunt_max <seconds>",
"autohunt set pray <seconds>",
"autohunt set battle <seconds>",
"autohunt set sell <seconds>",
"autohunt set coinflip <seconds>"
]
numbered_commands = [cmd for cmd in commands if cmd not in pinned_commands]
numbered_content = "\n".join(f"{black}[{white}{i+1}{black}] {white}{cmd}" for i, cmd in enumerate(numbered_commands))
await self.header_msg.edit(content=f"```ansi\n{black}[ {red}$close - Close Menu {black}] 🦇 {black}OWO HUNT 🦇 [ {red}$reset - Reset Menu {black}]```")
await self.content_msg.edit(content=f"""```ansi
{pinned_content}{numbered_content}```""")
await self.footer_msg.edit(content=f"```ansi\n ⠀⠀⠀⠀⠀ {black}I hunt in the shadows.```")
async def antitoken_menu(self, ctx):
await self.safe_delete(ctx)
if not self.help_session_active:
return
pinned_commands = self.favorites_data.get("category_pins", {}).get("antitoken", [])
pinned_content = ""
if pinned_commands:
pinned_content = f"{black}Pinned Commands:\n" + "\n".join(f"{black}[{white}★{black}] {white}{cmd}" for cmd in pinned_commands) + "\n\n"
commands = [
"antitoken toggle on",
"antitoken toggle off",
"antitoken limit mass_dm <amount>",
"antitoken limit guild_actions <amount>",
"antitoken limit account_changes <amount>",
"antitoken status"
]
numbered_commands = [cmd for cmd in commands if cmd not in pinned_commands]
numbered_content = "\n".join(f"{black}[{white}{i+1}{black}] {white}{cmd}" for i, cmd in enumerate(numbered_commands))
await self.header_msg.edit(content=f"```ansi\n{black}[ {red}$close - Close Menu {black}] 🦇 {black}ANTI TOKEN 🦇 [ {red}$reset - Reset Menu {black}]```")
await self.content_msg.edit(content=f"""```ansi
{pinned_content}{numbered_content}```""")
await self.footer_msg.edit(content=f"```ansi\n ⠀⠀⠀⠀⠀ {black}I protect what's mine.```")
async def token_controller_menu(self, ctx):
await self.safe_delete(ctx)
if not self.help_session_active:
return
pinned_commands = self.favorites_data.get("category_pins", {}).get("token controller", [])
pinned_content = ""
if pinned_commands:
pinned_content = f"{black}Pinned Commands:\n" + "\n".join(f"{black}[{white}★{black}] {white}{cmd}" for cmd in pinned_commands) + "\n\n"
commands = [
"tokens",
"tokens prefix <text>",
"tokens suffix <text>",
"tokens delay <seconds>",
"tokens mirror",
"tokens stop",
"tokens clear"
]
numbered_commands = [cmd for cmd in commands if cmd not in pinned_commands]
numbered_content = "\n".join(f"{black}[{white}{i+1}{black}] {white}{cmd}" for i, cmd in enumerate(numbered_commands))
await self.header_msg.edit(content=f"```ansi\n{black}[ {red}$close - Close Menu {black}] 🦇 {black}TOKEN CONTROLLER 🦇 [ {red}$reset - Reset Menu {black}]```")
await self.content_msg.edit(content=f"""```ansi
{pinned_content}{numbered_content}```""")
await self.footer_msg.edit(content=f"```ansi\n ⠀⠀⠀⠀⠀ {black}I control the shadows.```")
async def nuke_menu(self, ctx):
await self.safe_delete(ctx)
if not self.help_session_active:
return
pinned_commands = self.favorites_data.get("category_pins", {}).get("nuke", [])
pinned_content = ""
if pinned_commands:
pinned_content = f"{black}Pinned Commands:\n" + "\n".join(f"{black}[{white}★{black}] {white}{cmd}" for cmd in pinned_commands) + "\n\n"
commands = [
"nuke",
"nuke message <text>",
"nuke name <text>",
"nuke delay <seconds>",
"nuke speed <seconds>",
"nuke channels <amount>",
"nuke roles <amount>",
"nuke webhooks <amount>",
"nuke reset",
"nuke start",
"nuke stop"
]
numbered_commands = [cmd for cmd in commands if cmd not in pinned_commands]
numbered_content = "\n".join(f"{black}[{white}{i+1}{black}] {white}{cmd}" for i, cmd in enumerate(numbered_commands))
await self.header_msg.edit(content=f"```ansi\n{black}[ {red}$close - Close Menu {black}] 🦇 {black}KNIGHTFALL 🦇 [ {red}$reset - Reset Menu {black}]```")
await self.content_msg.edit(content=f"""```ansi
{pinned_content}{numbered_content}```""")
await self.footer_msg.edit(content=f"```ansi\n ⠀⠀⠀⠀⠀ {black}I am vengeance.```")
async def protection_menu(self, ctx):
await self.safe_delete(ctx)
if not self.help_session_active:
return
pinned_commands = self.favorites_data.get("category_pins", {}).get("protection", [])
pinned_content = ""
if pinned_commands:
pinned_content = f"{black}Pinned Commands:\n" + "\n".join(f"{black}[{white}★{black}] {white}{cmd}" for cmd in pinned_commands) + "\n\n"
commands = [
"detection",
"autoslow <seconds>",
"noinvite",
"setlog <channel>",
"setpunishment <type>",
"swhitelist <user>",
"sunwhitelist <user>",
"softban <user> [reason]",
"hardban <user> [reason]",
"unhardban <user>",
"ghostban <id> [reason]",
"multiban <id1 id2...>",
"banlist",
"stripall"
]
numbered_commands = [cmd for cmd in commands if cmd not in pinned_commands]
numbered_content = "\n".join(f"{black}[{white}{i+1}{black}] {white}{cmd}" for i, cmd in enumerate(numbered_commands))
await self.header_msg.edit(content=f"```ansi\n{black}[ {red}$close - Close Menu {black}] 🦇 {black}PROTECTION 🦇 [ {red}$reset - Reset Menu {black}]```")
await self.content_msg.edit(content=f"""```ansi
{pinned_content}{numbered_content}```""")
await self.footer_msg.edit(content=f"```ansi\n ⠀⠀⠀⠀⠀ {black}I protect this city.```")
async def voice_menu(self, ctx):
await self.safe_delete(ctx)
if not self.help_session_active:
return
pinned_commands = self.favorites_data.get("category_pins", {}).get("voice", [])
pinned_content = ""
if pinned_commands:
pinned_content = f"{black}Pinned Commands:\n" + "\n".join(f"{black}[{white}★{black}] {white}{cmd}" for cmd in pinned_commands) + "\n\n"
commands = [
"voice",
"voice join <channel>",
"voice leave",
"voice move <user> <channel>",
"voice region <region>",
"voice bitrate <kbps>",
"voice deafen <on/off>",
"voice mute <on/off>",
"voice quality <360/720/1080>",
"voice volume <0-100>",
"voice reset"
]
numbered_commands = [cmd for cmd in commands if cmd not in pinned_commands]
numbered_content = "\n".join(f"{black}[{white}{i+1}{black}] {white}{cmd}" for i, cmd in enumerate(numbered_commands))
await self.header_msg.edit(content=f"```ansi\n{black}[ {red}$close - Close Menu {black}] 🦇 {black}VOICE CONTROL 🦇 [ {red}$reset - Reset Menu {black}]```")
await self.content_msg.edit(content=f"""```ansi
{pinned_content}{numbered_content}```""")
await self.footer_msg.edit(content=f"```ansi\n ⠀⠀⠀⠀⠀ {black}I am the night.```")
@commands.command(name="16")
async def cmd_16(self, ctx):
await self.safe_delete(ctx)
if not self.help_session_active:
return
await self.nuke_menu(ctx)
await self.reset_timeout()
@commands.command(name="1")
async def cmd_1(self, ctx):
await self.safe_delete(ctx)
if not self.help_session_active:
return
await self.show_favorites_menu(ctx)
await self.reset_timeout()
@commands.command(name="2")
async def cmd_2(self, ctx):
await self.safe_delete(ctx)
if not self.help_session_active:
return
await self.chatpacking(ctx)
await self.reset_timeout()
@commands.command(name="3")
async def cmd_3(self, ctx):
await self.safe_delete(ctx)
if not self.help_session_active:
return
await self.token_utility(ctx)
await self.reset_timeout()
@commands.command(name="4")
async def cmd_4(self, ctx):
await self.safe_delete(ctx)
if not self.help_session_active:
return
await self.user_utility(ctx)
await self.reset_timeout()