Skip to content
This repository has been archived by the owner on Apr 4, 2021. It is now read-only.

Commit

Permalink
fix cog admin commands
Browse files Browse the repository at this point in the history
  • Loading branch information
drapaiton committed Oct 6, 2020
1 parent 2cbae59 commit 03f7e82
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cogs/admin/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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**")
Expand All @@ -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**")
Expand All @@ -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**")
Expand All @@ -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)]
Expand Down

0 comments on commit 03f7e82

Please sign in to comment.