From 54628f0d2f70f712833effa888cc7e3b2168290e Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Mon, 17 Aug 2026 21:51:40 -0400 Subject: [PATCH] chore: remove unused commands --- src/discord_bot/cogs/fun_commands.py | 36 ---------------------------- src/discord_bot/modals.py | 21 ---------------- src/discord_bot/views.py | 14 ----------- 3 files changed, 71 deletions(-) delete mode 100644 src/discord_bot/modals.py diff --git a/src/discord_bot/cogs/fun_commands.py b/src/discord_bot/cogs/fun_commands.py index b1baa0b..7c88759 100644 --- a/src/discord_bot/cogs/fun_commands.py +++ b/src/discord_bot/cogs/fun_commands.py @@ -8,7 +8,6 @@ # local imports from src.common.common import avatar, bot_name, colors -from src.discord_bot.views import RefundCommandView from src.discord_bot import cogs_common @@ -70,41 +69,6 @@ async def random_command( else: await ctx.respond(embed=embed) - @discord.slash_command( - name="refund", - description="Get refund form" - ) - async def refund_command( - self, - ctx: discord.ApplicationContext, - user: Option( - discord.Member, - description=cogs_common.user_mention_desc, - required=False, - ), - ): - """ - Sends a discord embed, with a `Modal`. - This command is pure satire. - - Parameters - ---------- - ctx : discord.ApplicationContext - Request message context. - user : discord.Member - Username to mention in response. - """ - embed = discord.Embed(title="Refund request", - description="Original purchase price: $0.00\n\n" - "Select the button below to request a full refund!", - color=colors['red']) - embed.set_footer(text=bot_name, icon_url=avatar) - - if user: - await ctx.respond(user.mention, embed=embed, view=RefundCommandView()) - else: - await ctx.respond(embed=embed, view=RefundCommandView()) - def setup(bot: discord.Bot): bot.add_cog(FunCommandsCog(bot=bot)) diff --git a/src/discord_bot/modals.py b/src/discord_bot/modals.py deleted file mode 100644 index 6385bd0..0000000 --- a/src/discord_bot/modals.py +++ /dev/null @@ -1,21 +0,0 @@ -# lib imports -import discord - - -class RefundModal(discord.ui.Modal): - """ - Class representing `discord.ui.Modal` for ``refund`` slash command. - """ - def __init__(self, *args, **kwargs) -> None: - super().__init__(*args, **kwargs) - - self.add_item(discord.ui.InputText(label="Name")) - self.add_item(discord.ui.InputText(label="Email")) - self.add_item(discord.ui.InputText(label="Purchase Date")) - - async def callback(self, interaction: discord.Interaction): - embed = discord.Embed(title="Refund request completed", - description="Your refund is being processed!") - embed.add_field(name="Original price", value="$0.00") - embed.add_field(name="Refund amount", value="$0.00") - await interaction.response.send_message(embeds=[embed]) diff --git a/src/discord_bot/views.py b/src/discord_bot/views.py index d6e5c8c..49b34f8 100644 --- a/src/discord_bot/views.py +++ b/src/discord_bot/views.py @@ -4,12 +4,10 @@ # lib imports import discord from discord.ui.select import Select -from discord.ui.button import Button # local imports from src.common.common import avatar, bot_name, colors from src.discord_bot.helpers import get_json -from src.discord_bot.modals import RefundModal class DocsCommandDefaultProjects: @@ -305,15 +303,3 @@ def __init__(self): ) self.add_item(button) - - -class RefundCommandView(discord.ui.View): - """ - Class representing `discord.ui.View` for ``refund`` slash command. - """ - def __init__(self): - super().__init__(timeout=None) # timeout of the view must be set to None, view is persistent - - @discord.ui.button(label="Refund form", style=discord.ButtonStyle.red, custom_id='button-refund') - async def button_callback(self, button: Button, interaction: discord.Interaction): - await interaction.response.send_modal(RefundModal(title="Refund Request Form"))