From 9c71bf42d730f7bdaeb4900f8cbb9f74bd7bb313 Mon Sep 17 00:00:00 2001 From: neoarz Date: Sun, 4 Jan 2026 21:54:50 -0500 Subject: [PATCH] feat: sidestore unofficial command --- cogs/events/stickybot.py | 4 ++- cogs/sidestore/__init__.py | 13 ++++++++++ cogs/sidestore/sidestore.py | 5 ++++ cogs/sidestore/unofficial.py | 49 ++++++++++++++++++++++++++++++++++++ 4 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 cogs/sidestore/unofficial.py diff --git a/cogs/events/stickybot.py b/cogs/events/stickybot.py index 58ae5ef..0bcc67a 100644 --- a/cogs/events/stickybot.py +++ b/cogs/events/stickybot.py @@ -133,7 +133,9 @@ def stickybot_command(): ) message_content = config.get("message", "*No message set*") - footer_text = config.get("footer", "This is an automated sticky message.") + footer_text = config.get( + "footer", "This is an automated sticky message." + ) full_content = f"{message_content}\n-# {footer_text}" embed.add_field( diff --git a/cogs/sidestore/__init__.py b/cogs/sidestore/__init__.py index e0466c3..4467919 100644 --- a/cogs/sidestore/__init__.py +++ b/cogs/sidestore/__init__.py @@ -13,6 +13,7 @@ from .afc import afc_command from .udid import udid_command from .half import half_command from .sparse import sparse_command +from .unofficial import unofficial_command @app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True) @@ -103,6 +104,10 @@ class Sidestore(commands.GroupCog, name="sidestore"): async def sidestore_group_sparse(self, context: Context): await self._invoke_hybrid(context, "sparse") + @sidestore_group.command(name="unofficial") + async def sidestore_group_unofficial(self, context: Context): + await self._invoke_hybrid(context, "unofficial") + @app_commands.command(name="help", description="SideStore troubleshooting help") async def help(self, interaction: discord.Interaction): embed = discord.Embed( @@ -180,6 +185,13 @@ class Sidestore(commands.GroupCog, name="sidestore"): async def sparse(self, context): return await sparse_command()(self, context) + @commands.check(_require_group_prefix) + @commands.hybrid_command( + name="unofficial", description="Unofficial guides and video walkthroughs" + ) + async def unofficial(self, context): + return await unofficial_command()(self, context) + async def setup(bot) -> None: cog = Sidestore(bot) @@ -195,3 +207,4 @@ async def setup(bot) -> None: bot.logger.info("Loaded extension 'sidestore.udid'") bot.logger.info("Loaded extension 'sidestore.half'") bot.logger.info("Loaded extension 'sidestore.sparse'") + bot.logger.info("Loaded extension 'sidestore.unofficial'") diff --git a/cogs/sidestore/sidestore.py b/cogs/sidestore/sidestore.py index e18de16..ce58381 100644 --- a/cogs/sidestore/sidestore.py +++ b/cogs/sidestore/sidestore.py @@ -51,6 +51,11 @@ class SidestoreSelect(discord.ui.Select): value="udid", description="SideStore could not determine device UDID", ), + discord.SelectOption( + label="Unofficial Guides", + value="unofficial", + description="Unofficial guides and video walkthroughs", + ), ] super().__init__(placeholder="Choose a SideStore command...", options=options) diff --git a/cogs/sidestore/unofficial.py b/cogs/sidestore/unofficial.py new file mode 100644 index 0000000..4052590 --- /dev/null +++ b/cogs/sidestore/unofficial.py @@ -0,0 +1,49 @@ +import discord +from discord.ext import commands + + +def unofficial_command(): + @commands.hybrid_command( + name="unofficial", description="Unofficial guides and video walkthroughs" + ) + async def unofficial(self, context): + embed = discord.Embed( + color=0x8E82F9, + description=( + "# Unofficial Guides and Videos\n\n---\n\n" + + "**PLEASE ONLY READ THE OFFICIAL DOCUMENTATION AND TROUBLESHOOTING GUIDE LOCATED AT https://docs.sidestore.io**\n\n" + + "If you do not try this first we **WILL NOT** provide support.\n\n" + + "There are currently **NO official video walkthroughs**." + ), + ) + embed.set_author( + name="SideStore", + icon_url="https://github.com/SideStore/assets/blob/main/icons/classic/Default.png?raw=true", + ) + embed.set_footer(text="Last Edited by CelloSerenity") + 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/unofficial.py", + emoji="<:githubicon:1417717356846776340>", + ) + ) + view.add_item( + discord.ui.Button( + label="Documentation", + style=discord.ButtonStyle.primary, + url="https://docs.sidestore.io", + emoji="<:sidestorepride:1417717648795631787>", + ) + ) + + if context.interaction: + await context.interaction.response.send_message(embed=embed, view=view) + else: + await context.send(embed=embed, view=view) + + return unofficial