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

@@ -253,14 +253,11 @@ class ideviceView(discord.ui.View):
self.add_item(ideviceSelect(bot))
class idevice(commands.Cog, name="idevice"):
def __init__(self, bot) -> None:
self.bot = bot
def idevice_command():
@commands.hybrid_command(
name="idevice", description="idevice troubleshooting and help"
)
async def idevice(self, context: Context) -> None:
async def idevice(self, context):
embed = discord.Embed(
title="idevice Commands",
description="Choose a command from the dropdown below to get help with specific issues:",
@@ -274,8 +271,5 @@ class idevice(commands.Cog, name="idevice"):
await context.interaction.response.send_message(embed=embed, view=view, ephemeral=True)
else:
await context.send(embed=embed, view=view)
async def setup(bot) -> None:
await bot.add_cog(idevice(bot))
return idevice