diff --git a/cogs/general/help.py b/cogs/general/help.py index 3f07dc5..8a0788a 100644 --- a/cogs/general/help.py +++ b/cogs/general/help.py @@ -13,7 +13,7 @@ class Help(commands.Cog, name="help"): interaction: discord.Interaction, current: str, ) -> list[app_commands.Choice[str]]: - categories = ["general", "fun", "moderation", "template", "owner"] + categories = ["general", "fun", "moderation", "template", "owner", "sidestore"] suggestions = [] for category in categories: @@ -56,6 +56,15 @@ class Help(commands.Cog, name="help"): "warnings": "moderation", "archive": "moderation", + "sidestore": "sidestore", + "refresh": "sidestore", + "code": "sidestore", + "crash": "sidestore", + "pairing": "sidestore", + "server": "sidestore", + "half": "sidestore", + "sparse": "sidestore", + "sync": "owner", "cog_management": "owner", "shutdown": "owner", @@ -68,7 +77,8 @@ class Help(commands.Cog, name="help"): "fun": "Funny commands", "moderation": "Administration commands", "template": "Template commands", - "owner": "Owner commands" + "owner": "Owner commands", + "sidestore": "SideStore troubleshooting commands" } if category is None: diff --git a/cogs/sidestore/code.py b/cogs/sidestore/code.py index a4c41b5..c8c84c6 100644 --- a/cogs/sidestore/code.py +++ b/cogs/sidestore/code.py @@ -35,7 +35,7 @@ class Code(commands.Cog, name="code"): ) ) embed.set_author(name="SideStore", icon_url="https://github.com/SideStore/assets/blob/main/icons/classic/Default.png?raw=true") - embed.set_footer(text=f'Last Edited by neoarz | Last updated at {int(time.time())}') + embed.set_footer(text=f'Last Edited by neoarz') embed.timestamp = discord.utils.utcnow() view = discord.ui.View() diff --git a/cogs/sidestore/pairing.py b/cogs/sidestore/pairing.py new file mode 100644 index 0000000..f7c7f17 --- /dev/null +++ b/cogs/sidestore/pairing.py @@ -0,0 +1,61 @@ +import discord +from discord import app_commands +from discord.ext import commands +from discord.ext.commands import Context +import time + + +class Pairing(commands.Cog, name="pairing"): + def __init__(self, bot) -> None: + self.bot = bot + + @commands.hybrid_command( + name="pairing", description="Help with pairing file issues" + ) + async def pairing(self, context: Context) -> None: + embed = discord.Embed( + color=0x8e82f9, + description=( + '# Cannot Choose Pairing File\n\n---\n\n' + + '1. **Check File Extension:**\n' + + " Make sure your pairing file's extension ends with `.mobiledevicepairing` or `.plist`\n" + + ' - If it doesn\'t, double-check to see if you had zipped your pairing file before sending it to your phone. Failing to do so may lead to the file being corrupted during transport\n\n' + + '2. **Move Pairing File:**\n' + + ' If you are unable to select the pairing file from within the app:\n' + + ' - Rename the file to `ALTPairingFile.mobiledevicepairing`\n' + + ' - Try moving the pairing file to the root directory of the SideStore folder in the Files app under "On My iPhone/iPad"\n\n' + + '3. **Certificate Signing:**\n' + + " When signing Sidestore with certain certificates, you won't be able to select the pairing file from within the app\n" + + ' - Try the fix mentioned above\n' + + ' - If you do not see the Sidestore folder in the Files app:\n' + + ' • Connect your phone to your computer\n' + + ' • Drag and drop the pairing file into the Sidestore app\'s files section\n' + + ' • Ensure the file is renamed to `ALTPairingFile.mobiledevicepairing`\n' + ) + ) + embed.set_author(name="SideStore", icon_url="https://github.com/SideStore/assets/blob/main/icons/classic/Default.png?raw=true") + 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", + emoji="<:githubicon:1417717356846776340>" + )) + view.add_item(discord.ui.Button( + label="Documentation", + style=discord.ButtonStyle.primary, + url="https://docs.sidestore.io/docs/troubleshooting/#cannot-choose-pairing-file", + emoji="<:sidestorepride:1417717648795631787>" + )) + + 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(Pairing(bot)) diff --git a/cogs/sidestore/sparse.py b/cogs/sidestore/sparse.py index 2c5e1bf..760984a 100644 --- a/cogs/sidestore/sparse.py +++ b/cogs/sidestore/sparse.py @@ -23,7 +23,7 @@ class Sparse(commands.Cog, name="sparse"): ) ) embed.set_author(name="SideStore", icon_url="https://github.com/SideStore/assets/blob/main/icons/classic/Default.png?raw=true") - embed.set_footer(text=f'Last Edited by neoarz | Last updated at {int(time.time())}') + embed.set_footer(text=f'Last Edited by neoarz') embed.timestamp = discord.utils.utcnow() view = discord.ui.View()