feat(bot): ⚰️ Remove appeals support.
This commit is contained in:
@@ -10,48 +10,6 @@ from payphone.core import constants
|
||||
from payphone.cogs.mods import modals, views, embeds
|
||||
|
||||
|
||||
class BanNotificationView(discord.ui.View):
|
||||
"""View sent with the ban notification embed.
|
||||
|
||||
This view contains a button that sends a modal to appeal the ban.
|
||||
"""
|
||||
|
||||
def __init__(self, bot: bot.Payphone, ban: models.Ban) -> None:
|
||||
"""Initializes the view.
|
||||
|
||||
Args:
|
||||
bot (bot.Payphone): The bot.
|
||||
ban (models.Ban): The ban to appeal.
|
||||
"""
|
||||
|
||||
super().__init__(timeout=None)
|
||||
|
||||
self.bot = bot
|
||||
|
||||
if ban.status != models.BanStatus.VALID:
|
||||
self.disable_all_items()
|
||||
self.children[0].label = "Appealed"
|
||||
|
||||
self.add_item(
|
||||
discord.ui.Button(
|
||||
label=f"Status: {ban.status.name.replace("_", " ").lower().title()}",
|
||||
disabled=True,
|
||||
)
|
||||
)
|
||||
|
||||
@discord.ui.button(
|
||||
label="Appeal Ban",
|
||||
custom_id="ban-notification:appeal-ban",
|
||||
style=discord.ButtonStyle.blurple,
|
||||
)
|
||||
async def callback(
|
||||
self, _button: discord.ui.Button, interaction: discord.Interaction
|
||||
) -> None:
|
||||
"""Sends the ban appeal modal."""
|
||||
|
||||
await interaction.response.send_modal(modals.BanNotificationModal(self.bot))
|
||||
|
||||
|
||||
class ReportView(discord.ui.View):
|
||||
"""The view sent together with the report embed."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user