From 54c0da4d292bec1b2824694fc6035a32587d53c0 Mon Sep 17 00:00:00 2001 From: neoarz Date: Wed, 17 Sep 2025 08:30:05 -0400 Subject: [PATCH] feat: refresh command and update GitHub links Introduces a new 'refresh' command for troubleshooting app refresh/install issues. Updates 'Edit Command' button URLs in code, pairing, server, and sparse cogs to point directly to their respective source files on GitHub. Removes timestamp from server cog footer. --- cogs/idevice/idevice.py | 3 +++ cogs/sidestore/code.py | 2 +- cogs/sidestore/pairing.py | 2 +- cogs/sidestore/refresh.py | 53 +++++++++++++++++++++++++++++++++++++++ cogs/sidestore/server.py | 4 +-- cogs/sidestore/sparse.py | 2 +- 6 files changed, 61 insertions(+), 5 deletions(-) create mode 100644 cogs/idevice/idevice.py create mode 100644 cogs/sidestore/refresh.py diff --git a/cogs/idevice/idevice.py b/cogs/idevice/idevice.py new file mode 100644 index 0000000..5360f64 --- /dev/null +++ b/cogs/idevice/idevice.py @@ -0,0 +1,3 @@ +async def setup(bot) -> None: + pass + diff --git a/cogs/sidestore/code.py b/cogs/sidestore/code.py index c8c84c6..4690f20 100644 --- a/cogs/sidestore/code.py +++ b/cogs/sidestore/code.py @@ -42,7 +42,7 @@ class Code(commands.Cog, name="code"): view.add_item(discord.ui.Button( label="Edit Command", style=discord.ButtonStyle.secondary, - url="https://github.com/neoarz/syntrel", + url="https://github.com/neoarz/syntrel/blob/main/cogs/sidestore/code.py", emoji="<:githubicon:1417717356846776340>" )) view.add_item(discord.ui.Button( diff --git a/cogs/sidestore/pairing.py b/cogs/sidestore/pairing.py index f7c7f17..4015004 100644 --- a/cogs/sidestore/pairing.py +++ b/cogs/sidestore/pairing.py @@ -41,7 +41,7 @@ class Pairing(commands.Cog, name="pairing"): view.add_item(discord.ui.Button( label="Edit Command", style=discord.ButtonStyle.secondary, - url="https://github.com/neoarz/syntrel", + url="https://github.com/neoarz/syntrel/blob/main/cogs/sidestore/pairing.py", emoji="<:githubicon:1417717356846776340>" )) view.add_item(discord.ui.Button( diff --git a/cogs/sidestore/refresh.py b/cogs/sidestore/refresh.py new file mode 100644 index 0000000..ae055a2 --- /dev/null +++ b/cogs/sidestore/refresh.py @@ -0,0 +1,53 @@ +import discord +from discord import app_commands +from discord.ext import commands +from discord.ext.commands import Context +import time + + +class Refresh(commands.Cog, name="refresh"): + def __init__(self, bot) -> None: + self.bot = bot + + @commands.hybrid_command( + name="refresh", description="Help with refreshing or installing apps" + ) + async def refresh(self, context: Context) -> None: + embed = discord.Embed( + color=0x8e82f9, + description=( + '# Can\'t Refresh or Install Apps\n\n---\n\n' + + '1. **Make sure your device is connected to a stable Wi-Fi network and not using cellular data.**\n' + + '2. **Verify VPN is connected in the StosVPN app.**\n' + + '3. **Turn off, then turn back on StosVPN, and wait a few seconds in Sidestore before trying to refresh.**\n' + + '4. **Create a brand new pairing file.**\n' + + ' - If none of the above worked, it is very likely that the pairing file is corrupted. You can reference the documentation on how to create a new pairing file [here](https://docs.sidestore.io/docs/troubleshooting/#cant-refresh-or-install-apps).\n' + + ' - After creating a new pairing file, go to Sidestore settings and press "Reset pairing file," then choose the new pairing file you just created.\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/blob/main/cogs/sidestore/refresh.py", + emoji="<:githubicon:1417717356846776340>" + )) + view.add_item(discord.ui.Button( + label="Documentation", + style=discord.ButtonStyle.primary, + url="https://docs.sidestore.io/docs/troubleshooting/#cant-refresh-or-install-apps", + 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(Refresh(bot)) diff --git a/cogs/sidestore/server.py b/cogs/sidestore/server.py index 0a27983..13a647f 100644 --- a/cogs/sidestore/server.py +++ b/cogs/sidestore/server.py @@ -28,14 +28,14 @@ class Server(commands.Cog, name="server"): ) ) 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() view.add_item(discord.ui.Button( label="Edit Command", style=discord.ButtonStyle.secondary, - url="https://github.com/neoarz/syntrel", + url="https://github.com/neoarz/syntrel/blob/main/cogs/sidestore/server.py", emoji="<:githubicon:1417717356846776340>" )) view.add_item(discord.ui.Button( diff --git a/cogs/sidestore/sparse.py b/cogs/sidestore/sparse.py index 760984a..e23c837 100644 --- a/cogs/sidestore/sparse.py +++ b/cogs/sidestore/sparse.py @@ -30,7 +30,7 @@ class Sparse(commands.Cog, name="sparse"): view.add_item(discord.ui.Button( label="Edit Command", style=discord.ButtonStyle.secondary, - url="https://github.com/neoarz/syntrel", + url="https://github.com/neoarz/syntrel/blob/main/cogs/sidestore/sparse.py", emoji="<:githubicon:1417717356846776340>" )) view.add_item(discord.ui.Button(