refactor(idevice): commands into a single GroupCog

Merged idevice-related commands into a unified GroupCog in cogs/idevice/__init__.py, replacing individual Cog classes with command factory functions. Updated bot.py and help.py to support the new structure and improved command categorization. This refactor simplifies extension loading and command management for idevice troubleshooting features.
This commit is contained in:
neoarz
2025-09-28 22:57:26 -04:00
parent 72cdd9b403
commit 51393ece85
8 changed files with 110 additions and 98 deletions

View File

@@ -38,17 +38,14 @@ class Help(commands.Cog, name="help"):
category_mapping = {
# General Commands
"help": "general",
"botinfo": "general",
"serverinfo": "general",
"ping": "general",
"feedback": "general",
"uptime": "general",
# "context_menus": "general",
"general": "general",
# Fun Commands
"fun": "fun",
# idevice Commands
"idevice": "idevice",
# Moderation Commands
"kick": "moderation",
"ban": "moderation",
@@ -70,13 +67,6 @@ class Help(commands.Cog, name="help"):
"afc": "sidestore",
"udid": "sidestore",
# idevice Commands
"idevice": "idevice",
"noapps": "idevice",
"errorcodes": "idevice",
"developermode": "idevice",
"mountddi": "idevice",
# Owner Commands
"sync": "owner",
"cog_management": "owner",
@@ -180,7 +170,7 @@ class Help(commands.Cog, name="help"):
commands_in_category.append((app_command.name, description))
seen_names.add(app_command.name)
if hasattr(app_command, 'commands') and category == "fun":
if hasattr(app_command, 'commands') and category in ["fun", "general", "idevice"]:
for subcommand in app_command.commands:
if subcommand.name in seen_names:
continue