Skip to content
This repository was archived by the owner on Feb 7, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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 = [
Expand Down