mirror of
https://github.com/neoarz/Syntrel.git
synced 2025-12-25 03:40:11 +01:00
fix(idevice): rename all commands to idevice
This commit is contained in:
@@ -72,7 +72,7 @@ class Help(commands.Cog, name="help"):
|
||||
"afc": "sidestore",
|
||||
"udid": "sidestore",
|
||||
|
||||
# iDevice Commands
|
||||
# idevice Commands
|
||||
"idevice": "idevice",
|
||||
"noapps": "idevice",
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user