mirror of
https://github.com/neoarz/Syntrel.git
synced 2025-12-25 11:40:12 +01:00
fix(feedback): wasnt working due to app commands
This commit is contained in:
@@ -17,10 +17,13 @@ class FeedbackForm(discord.ui.Modal, title="Feeedback"):
|
||||
self.stop()
|
||||
|
||||
def feedback_command():
|
||||
@app_commands.command(
|
||||
name="feedback", description="Submit a feedback for the owners of the bot"
|
||||
@commands.hybrid_command(
|
||||
name="feedback",
|
||||
description="Submit a feedback for the owners of the bot"
|
||||
)
|
||||
async def feedback(self, interaction: discord.Interaction):
|
||||
async def feedback(self, context):
|
||||
if getattr(context, "interaction", None):
|
||||
interaction = context.interaction
|
||||
feedback_form = FeedbackForm()
|
||||
await interaction.response.send_modal(feedback_form)
|
||||
|
||||
@@ -43,5 +46,7 @@ def feedback_command():
|
||||
color=0x7289DA,
|
||||
).set_author(name="Feedback System", icon_url="https://yes.nighty.works/raw/gSxqzV.png")
|
||||
)
|
||||
else:
|
||||
await context.send("This command can only be used as a slash command. Please use `/general feedback` instead.")
|
||||
|
||||
return feedback
|
||||
Reference in New Issue
Block a user