diff --git a/.gitignore b/.gitignore index 8a59aec..4f584dc 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,4 @@ coverage.xml docs/_build/ extensions/__pycache__/core.cpython-38.pyc extensions/__pycache__/core.cpython-38.pyc +extensions/__pycache__/core.cpython-38.pyc diff --git a/extensions/__pycache__/core.cpython-38.pyc b/extensions/__pycache__/core.cpython-38.pyc index ba376c3..74bd1c3 100644 Binary files a/extensions/__pycache__/core.cpython-38.pyc and b/extensions/__pycache__/core.cpython-38.pyc differ diff --git a/extensions/botlist.py b/extensions/botlist.py index 500481f..e74c51b 100644 --- a/extensions/botlist.py +++ b/extensions/botlist.py @@ -16,9 +16,11 @@ class BotList(commands.Cog, name='Bot List'): """Provides various utilities for handling BotList stuff.""" def __init__(self, bot): + # Main Stuff self.bot = bot self.request = bot.request + self.emoji = "\U0001F5F3" # List Tokens self.dbl_token = bot.config['DBL'] diff --git a/extensions/core.py b/extensions/core.py index 0b19d93..d2fb4d7 100644 --- a/extensions/core.py +++ b/extensions/core.py @@ -16,20 +16,26 @@ import math import psutil from extensions.helpcmd import TaciHelpCommand + class Core(commands.Cog): """Provides all core features of a bot.""" def __init__(self, bot): + + # Main Stuff self.bot = bot - self.settings = { + self.emoji = "\U0001F4E6" + self.settings = { 'extensions': [] } + # Help Command self._original_help_command = bot.help_command if bot.config['CUSTOM_HELP']: bot.help_command = TaciHelpCommand() bot.help_command.cog = self + # Extensions self._init_extensions() def _init_extensions(self): diff --git a/extensions/developer.py b/extensions/developer.py index 2d8659b..1937081 100644 --- a/extensions/developer.py +++ b/extensions/developer.py @@ -25,8 +25,13 @@ class Developer(commands.Cog): """Provides various resources for developers.""" def __init__(self, bot): + + # Main Stuff self.bot = bot self.request = bot.request + self.emoji = "\U0001F3D7" + + # Repl/Eval Stuff self.repl_sessions = {} self.repl_embeds = {} self._eval = {} diff --git a/extensions/helpcmd.py b/extensions/helpcmd.py index ca637e9..c27e68f 100644 --- a/extensions/helpcmd.py +++ b/extensions/helpcmd.py @@ -11,6 +11,8 @@ import itertools class TaciHelpCommand(commands.MinimalHelpCommand): def __init__(self, **options): + + # Main Stuff super().__init__(**options) self.command_attrs['help'] = "Find more assistance on this bot." self.subcommands_heading = "Subcommands" @@ -94,7 +96,7 @@ class TaciHelpCommand(commands.MinimalHelpCommand): self.paginator.add_line(f"**{heading}**") # TODO Make the Core Dynamic - if heading == 'Core': + if heading == '\U0001F4E6 Core': # `command1`, `command2`, `command3` # On Same Line self.paginator.add_line(", ".join(f"`{c.name}`" for c in commands)) @@ -125,7 +127,10 @@ class TaciHelpCommand(commands.MinimalHelpCommand): no_category = '\u200b{0.no_category}'.format(self) def get_category(command, *, no_category=no_category): cog = command.cog - return cog.qualified_name if cog is not None else no_category + if cog is not None: + return f"{cog.emoji} {cog.qualified_name}" if cog.emoji else cog.qualified_name + else: + return no_category # Gets all commands and categories to iterate over filtered = await self.filter_commands(bot.commands, sort=True, key=get_category) @@ -134,13 +139,13 @@ class TaciHelpCommand(commands.MinimalHelpCommand): # Splits Bot List and Core commands out of the others for category, commands in to_iterate: commands = sorted(commands, key=lambda c: c.name) if self.sort_commands else list(commands) - if category in ['Core', 'Bot List']: + if category in ['\U0001F4E6 Core', '\U0001F5F3 Bot List']: main_cmds.extend(commands) else: other_cmds[category] = commands # Core/Bot List commands become compacted - self.add_bot_commands_formatting(main_cmds, 'Core') + self.add_bot_commands_formatting(main_cmds, '\U0001F4E6 Core') # Everything else is normal for category, commands in other_cmds.items(): @@ -164,7 +169,8 @@ class TaciHelpCommand(commands.MinimalHelpCommand): # New Line # **Cog Name** - self.paginator.add_line(f"**{cog.qualified_name}**") + self.paginator.add_line( + f"{cog.emoji} **{cog.qualified_name}**" if cog.emoji else f"{cog.qualified_name}") # _Description if there_ if cog.description: diff --git a/extensions/search.py b/extensions/search.py index 4411bb3..3f023d2 100644 --- a/extensions/search.py +++ b/extensions/search.py @@ -16,9 +16,12 @@ class Search(commands.Cog): """Searches the web for a variety of different resources.""" def __init__(self, bot): + + # Main Stuff self.bot = bot self.request = bot.request self.instances = bot.instances + self.emoji = "\U0001F50D" async def _search_logic(self, query: str, is_nsfw: bool = False, category: str = None): """Provides search logic for all search commands."""