mirror of
https://github.com/neoarz/Syntrel.git
synced 2025-12-25 11:40:12 +01:00
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:
@@ -5,14 +5,11 @@ from discord.ext.commands import Context
|
||||
import time
|
||||
|
||||
|
||||
class Noapps(commands.Cog, name="noapps"):
|
||||
def __init__(self, bot) -> None:
|
||||
self.bot = bot
|
||||
|
||||
def noapps_command():
|
||||
@commands.hybrid_command(
|
||||
name="noapps", description="Help when apps aren't showing in installed apps view"
|
||||
)
|
||||
async def noapps(self, context: Context) -> None:
|
||||
async def noapps(self, context):
|
||||
embed = discord.Embed(
|
||||
color=0xfa8c4a,
|
||||
description=(
|
||||
@@ -41,7 +38,5 @@ class Noapps(commands.Cog, name="noapps"):
|
||||
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(Noapps(bot))
|
||||
|
||||
return noapps
|
||||
|
||||
Reference in New Issue
Block a user