diff --git a/main.py b/main.py index 9a6f47b6..193c76d6 100644 --- a/main.py +++ b/main.py @@ -269,7 +269,14 @@ async def load(ctx: ApplicationContext, cog: str): try: client.load_extension(f"cogs.{cog}") await ctx.respond(embed=discord.Embed(description=f"{cog} cog successfully loaded.", color=discord.Color.green())) - except Exception as e: await ctx.respond(embed=discord.Embed(description=f"{cog} failed to load: {e}", color=discord.Color.red())) + except Exception as e: + await ctx.respond( + embed=discord.Embed( + title=f"{cog} failed to load", + description=f"```{type(e).__name__}: {e}```", + color=discord.Color.red() + ) + ) @cogs.command( name="disable", @@ -281,7 +288,14 @@ async def disable(ctx: ApplicationContext, cog: str): try: client.unload_extension(f"cogs.{cog}") await ctx.respond(embed=discord.Embed(description=f"{cog} cog successfully disabled.", color=discord.Color.green())) - except: await ctx.respond(embed=discord.Embed(description=f"{cog} cog not found."), color=discord.Color.red()) + except Exception as e: + await ctx.respond( + embed=discord.Embed( + title=f"{cog} failed to disable", + description=f"```{type(e).__name__}: {e}```", + color=discord.Color.red() + ) + ) @cogs.command( name="reload", @@ -293,7 +307,14 @@ async def reload(ctx: ApplicationContext, cog: str): try: client.reload_extension(f"cogs.{cog}") await ctx.respond(embed=discord.Embed(description=f"{cog} cog successfully reloaded.", color=discord.Color.green())) - except: await ctx.respond(embed=discord.Embed(description=f"{cog} cog not found.", color=discord.Color.red())) + except Exception as e: + await ctx.respond( + embed=discord.Embed( + title=f"{cog} failed to reload", + description=f"```{type(e).__name__}: {e}```", + color=discord.Color.red() + ) + ) # Initialization active_cogs = [