24 lines
848 B
Python
24 lines
848 B
Python
"""Views used for submission process."""
|
|
|
|
import nextcord
|
|
from nextcord.ext import commands
|
|
|
|
|
|
class SubmissionCreateButton(nextcord.ui.View):
|
|
"""Defines view for score submission button."""
|
|
|
|
def __init__(self, bot: commands.Bot):
|
|
super().__init__(timeout=None)
|
|
self._bot = bot
|
|
|
|
@nextcord.ui.button(label="Submit", style=nextcord.ButtonStyle.primary, custom_id="submitcreate")
|
|
async def submitcreate_button(self, button: nextcord.ui.Button, interaction: nextcord.Interaction) -> None: # noqa: ARG002
|
|
"""
|
|
Button for score submission.
|
|
|
|
Is deprecated, sends response telling user to use the new command instead.
|
|
"""
|
|
await interaction.response.send_message(
|
|
"This feature has been deprecated. Please use the '/submit' slash command instead.", ephemeral=True
|
|
)
|