From 03f7e823b841efd41b6a4848ba093772926931d8 Mon Sep 17 00:00:00 2001 From: drapaiton Date: Tue, 6 Oct 2020 14:51:31 -0500 Subject: [PATCH] fix cog admin commands --- cogs/admin/main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cogs/admin/main.py b/cogs/admin/main.py index 2c846b0..10e6d07 100644 --- a/cogs/admin/main.py +++ b/cogs/admin/main.py @@ -28,7 +28,7 @@ async def amiadmin(self, ctx): async def load(self, ctx, name: str): """ Loads an extension. """ try: - self.bot.load_extension(f"cogs.{name}") + self.bot.load_extension(f"cogs.{name}.main") except Exception as e: return await ctx.send(default.traceback_maker(e)) await ctx.send(f"Loaded extension **{name}.py**") @@ -38,7 +38,7 @@ async def load(self, ctx, name: str): async def unload(self, ctx, name: str): """ Unloads an extension. """ try: - self.bot.unload_extension(f"cogs.{name}") + self.bot.unload_extension(f"cogs.{name}.main") except Exception as e: return await ctx.send(default.traceback_maker(e)) await ctx.send(f"Unloaded extension **{name}.py**") @@ -48,7 +48,7 @@ async def unload(self, ctx, name: str): async def reload(self, ctx, name: str): """ Reloads an extension. """ try: - self.bot.reload_extension(f"cogs.{name}") + self.bot.reload_extension(f"cogs.{name}.main") except Exception as e: return await ctx.send(default.traceback_maker(e)) await ctx.send(f"Reloaded extension **{name}.py**") @@ -62,7 +62,7 @@ async def reloadall(self, ctx): if file.endswith(".py"): name = file[:-3] try: - self.bot.reload_extension(f"cogs.{name}") + self.bot.reload_extension(f"cogs.{name}.main") except Exception as e: error_collection.append( [file, default.traceback_maker(e, advance=False)]