From deef9156fa827df6276bd8e4f48eb46e06d9768d Mon Sep 17 00:00:00 2001 From: neoarz Date: Mon, 22 Sep 2025 09:11:05 -0400 Subject: [PATCH] fix(idevice): rename all commands to idevice --- cogs/general/help.py | 2 +- cogs/idevice/idevice.py | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cogs/general/help.py b/cogs/general/help.py index ca6ad61..531576f 100644 --- a/cogs/general/help.py +++ b/cogs/general/help.py @@ -72,7 +72,7 @@ class Help(commands.Cog, name="help"): "afc": "sidestore", "udid": "sidestore", - # iDevice Commands + # idevice Commands "idevice": "idevice", "noapps": "idevice", diff --git a/cogs/idevice/idevice.py b/cogs/idevice/idevice.py index d639a7d..f0ee24c 100644 --- a/cogs/idevice/idevice.py +++ b/cogs/idevice/idevice.py @@ -4,7 +4,7 @@ from discord.ext import commands from discord.ext.commands import Context -class IdeviceSelect(discord.ui.Select): +class ideviceSelect(discord.ui.Select): def __init__(self, bot): self.bot = bot options = [ @@ -14,7 +14,7 @@ class IdeviceSelect(discord.ui.Select): description="Help when apps aren't showing in installed apps view", ) ] - super().__init__(placeholder="Choose an iDevice command...", options=options) + super().__init__(placeholder="Choose an idevice command...", options=options) async def callback(self, interaction: discord.Interaction): command_name = self.values[0] @@ -30,7 +30,7 @@ class IdeviceSelect(discord.ui.Select): description=f"Successfully executed `/{command_name}`", color=0x00FF00 ) - embed.set_author(name="iDevice", icon_url="https://yes.nighty.works/raw/snLMuO.png") + embed.set_author(name="idevice", icon_url="https://yes.nighty.works/raw/snLMuO.png") await interaction.response.edit_message(embed=embed, view=None) except discord.Forbidden: self.bot.logger.warning(f"Bot missing permissions in server {interaction.guild.name} (ID: {interaction.guild.id}) - cannot execute {command_name} command") @@ -39,7 +39,7 @@ class IdeviceSelect(discord.ui.Select): description="The bot doesn't have the required permissions in this server to execute commands. Please contact a server administrator to add the bot to the server.", color=0xFF0000 ) - embed.set_author(name="iDevice", icon_url="https://yes.nighty.works/raw/snLMuO.png") + embed.set_author(name="idevice", icon_url="https://yes.nighty.works/raw/snLMuO.png") await interaction.response.edit_message(embed=embed, view=None) except Exception as e: self.bot.logger.error(f"Error executing {command_name} command: {e}") @@ -48,7 +48,7 @@ class IdeviceSelect(discord.ui.Select): description="An error occurred while executing the command.", color=0xFF0000 ) - embed.set_author(name="iDevice", icon_url="https://yes.nighty.works/raw/snLMuO.png") + embed.set_author(name="idevice", icon_url="https://yes.nighty.works/raw/snLMuO.png") await interaction.response.edit_message(embed=embed, view=None) else: embed = discord.Embed( @@ -56,17 +56,17 @@ class IdeviceSelect(discord.ui.Select): description="Command not found!", color=0xFF0000 ) - embed.set_author(name="iDevice", icon_url="https://yes.nighty.works/raw/snLMuO.png") + embed.set_author(name="idevice", icon_url="https://yes.nighty.works/raw/snLMuO.png") await interaction.response.edit_message(embed=embed, view=None) -class IdeviceView(discord.ui.View): +class ideviceView(discord.ui.View): def __init__(self, bot): super().__init__() - self.add_item(IdeviceSelect(bot)) + self.add_item(ideviceSelect(bot)) -class Idevice(commands.Cog, name="idevice"): +class idevice(commands.Cog, name="idevice"): def __init__(self, bot) -> None: self.bot = bot @@ -81,7 +81,7 @@ class Idevice(commands.Cog, name="idevice"): ) embed.set_author(name="idevice", icon_url="https://yes.nighty.works/raw/snLMuO.png") - view = IdeviceView(self.bot) + view = ideviceView(self.bot) if context.interaction: await context.interaction.response.send_message(embed=embed, view=view, ephemeral=True) @@ -90,4 +90,4 @@ class Idevice(commands.Cog, name="idevice"): async def setup(bot) -> None: - await bot.add_cog(Idevice(bot)) + await bot.add_cog(idevice(bot))