Files
Syntrel/cogs/sidestore/server.py
neoarz 54c0da4d29 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.
2025-09-17 08:30:05 -04:00

56 lines
2.4 KiB
Python

import discord
from discord import app_commands
from discord.ext import commands
from discord.ext.commands import Context
import time
class Server(commands.Cog, name="server"):
def __init__(self, bot) -> None:
self.bot = bot
@commands.hybrid_command(
name="server", description="Help with anisette server issues"
)
async def server(self, context: Context) -> None:
embed = discord.Embed(
color=0x8e82f9,
description=(
'# Sidestore Freezing or Displaying an Error Code During Sign-In\n\n---\n\n' +
'1. **Change the Anisette Server:**\n' +
' The most common solution is to switch to a different Anisette server. Do this:\n' +
' - Open Sidestore settings\n' +
' - Scroll down to the "Anisette Server" option\n' +
' - Select a different server from the list\n' +
' - You might need to try a few servers from the list and find which works best for you\n\n' +
'2. **Host Your Own Anisette Server:**\n' +
' If you prefer, you can set up your own Anisette server. Detailed instructions for hosting an Anisette server are available in the official documentation and can be found [here](https://docs.sidestore.io/docs/advanced/anisette).\n\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/server.py",
emoji="<:githubicon:1417717356846776340>"
))
view.add_item(discord.ui.Button(
label="Documentation",
style=discord.ButtonStyle.primary,
url="https://docs.sidestore.io/docs/troubleshooting/#sidestore-freezing-or-displaying-an-error-code-during-sign-in",
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(Server(bot))