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

@@ -5,14 +5,11 @@ from discord.ext.commands import Context
import time
class Developermode(commands.Cog, name="developermode"):
def __init__(self, bot) -> None:
self.bot = bot
def developermode_command():
@commands.hybrid_command(
name="developermode", description="How to turn on developer mode"
)
async def developermode(self, context: Context) -> None:
async def developermode(self, context):
embed = discord.Embed(
color=0xfa8c4a,
description=(
@@ -40,7 +37,5 @@ class Developermode(commands.Cog, name="developermode"):
await context.interaction.response.send_message(embed=embed, view=view)
else:
await context.send(embed=embed, view=view)
async def setup(bot) -> None:
await bot.add_cog(Developermode(bot))
return developermode