From a305c87f4afe2dfb58d2a19081510e7571962442 Mon Sep 17 00:00:00 2001 From: neoarz Date: Fri, 26 Sep 2025 20:30:46 -0400 Subject: [PATCH] feat(idevice): add developermode command --- cogs/general/help.py | 1 + cogs/idevice/developermode.py | 46 +++++++++++++++++++++++++++++++++++ cogs/idevice/idevice.py | 6 +++++ 3 files changed, 53 insertions(+) create mode 100644 cogs/idevice/developermode.py diff --git a/cogs/general/help.py b/cogs/general/help.py index 687004b..018dd84 100644 --- a/cogs/general/help.py +++ b/cogs/general/help.py @@ -78,6 +78,7 @@ class Help(commands.Cog, name="help"): "idevice": "idevice", "noapps": "idevice", "errorcodes": "idevice", + "developermode": "idevice", # Owner Commands "sync": "owner", diff --git a/cogs/idevice/developermode.py b/cogs/idevice/developermode.py new file mode 100644 index 0000000..1be3ba7 --- /dev/null +++ b/cogs/idevice/developermode.py @@ -0,0 +1,46 @@ +import discord +from discord import app_commands +from discord.ext import commands +from discord.ext.commands import Context +import time + + +class Developermode(commands.Cog, name="developermode"): + def __init__(self, bot) -> None: + self.bot = bot + + @commands.hybrid_command( + name="developermode", description="How to turn on developer mode" + ) + async def developermode(self, context: Context) -> None: + embed = discord.Embed( + color=0xfa8c4a, + description=( + '# How to Enable Developer Mode\n\n---\n\n' + + '1. Open the "Settings" app\n' + + '2. Navigate to "Privacy & Security"\n' + + '3. Scroll all the way down to find "Developer Mode"\n\n' + + 'If you don\'t see the Developer Mode option, you need to install a developer app first.\n\n' + + 'You can use [SideStore](https://sidestore.io/) for this purpose - follow their installation guide to get started.' + ) + ) + embed.set_author(name="idevice", icon_url="https://yes.nighty.works/raw/snLMuO.png") + embed.set_footer(text=f'Last Edited by neoarz') + embed.timestamp = discord.utils.utcnow() + + view = discord.ui.View() + view.add_item(discord.ui.Button( + label="Edit Command", + style=discord.ButtonStyle.secondary, + url="https://github.com/neoarz/Syntrel/blob/main/cogs/idevice/developermode.py", + emoji="<:githubicon:1417717356846776340>" + )) + + if context.interaction: + 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)) diff --git a/cogs/idevice/idevice.py b/cogs/idevice/idevice.py index 73825da..d9551b3 100644 --- a/cogs/idevice/idevice.py +++ b/cogs/idevice/idevice.py @@ -154,6 +154,11 @@ class ideviceSelect(discord.ui.Select): value="errorcodes", description="Browse idevice error codes", ), + discord.SelectOption( + label="Developer Mode", + value="developermode", + description="How to turn on developer mode", + ), ] super().__init__(placeholder="Choose an idevice command...", options=options) @@ -266,5 +271,6 @@ class idevice(commands.Cog, name="idevice"): await context.send(embed=embed, view=view) + async def setup(bot) -> None: await bot.add_cog(idevice(bot)) \ No newline at end of file