diff --git a/otter_welcome_buddy/startup/cogs.py b/otter_welcome_buddy/startup/cogs.py index 7809c17..194baa2 100644 --- a/otter_welcome_buddy/startup/cogs.py +++ b/otter_welcome_buddy/startup/cogs.py @@ -6,7 +6,7 @@ def __format_module_path_into_cog_extension(absolute_module_path: str) -> str: """Transforms absolute module path into ..""" module_absolute_path_no_extension: str = absolute_module_path[:-3] - module_relative_path: list[str] = module_absolute_path_no_extension.split("/")[-3:] + module_relative_path: list[str] = module_absolute_path_no_extension.split("/")[-2:] return ".".join(module_relative_path) @@ -17,7 +17,6 @@ async def register_cogs(bot: Bot) -> None: ] for cog in allowed_cogs: - pass # __file__ stores absolute path - # cog_extension = __format_module_path_into_cog_extension(cog.__file__) - # await bot.load_extension(cog_extension) + cog_extension = __format_module_path_into_cog_extension(cog.__file__) + await bot.load_extension(cog_extension)