refactor(utility): make command group

Introduces a new 'utilities' cog and a 'translate' command for translating text between languages. Refactors the translate functionality from a class-based cog to a function-based command, updates bot and help modules to register the new cog, and ensures proper language autocomplete and error handling.
This commit is contained in:
neoarz
2025-09-28 23:35:39 -04:00
parent 3bc5ebe192
commit a5eff449eb
4 changed files with 45 additions and 25 deletions

2
bot.py
View File

@@ -90,7 +90,7 @@ class DiscordBot(commands.Bot):
if os.path.exists(init_file):
try:
await self.load_extension(f"cogs.{folder}")
if folder not in ["fun", "general", "idevice", "miscellaneous", "moderation", "owner", "sidestore"]:
if folder not in ["fun", "general", "idevice", "miscellaneous", "moderation", "owner", "sidestore", "utilities"]:
self.logger.info(f"Loaded extension '{folder}'")
except Exception as e:
exception = f"{type(e).__name__}: {e}"