fix(bug_report): envoyer le modal directement sans message intermédiaire
Les commandes /signaler_bug et /suggerer_fonctionnalite ouvrent maintenant le formulaire modal directement sans passer par un embed + bouton. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a9f577fc06
commit
5913305be9
1 changed files with 4 additions and 14 deletions
|
|
@ -457,13 +457,8 @@ class BugReport(commands.Cog):
|
||||||
)
|
)
|
||||||
async def signifier_bug(self, interaction: disnake.ApplicationCommandInteraction):
|
async def signifier_bug(self, interaction: disnake.ApplicationCommandInteraction):
|
||||||
"""Ouvre un formulaire pour signaler un bug."""
|
"""Ouvre un formulaire pour signaler un bug."""
|
||||||
embed = disnake.Embed(
|
modal = BugReportModal()
|
||||||
title="🐛 Signaler un Bug",
|
await interaction.response.send_modal(modal)
|
||||||
description="Cliquez sur le bouton ci-dessous pour remplir le formulaire de signalement.",
|
|
||||||
color=disnake.Color.red()
|
|
||||||
)
|
|
||||||
view = BugReportView()
|
|
||||||
await interaction.response.send_message(embed=embed, view=view, ephemeral=True)
|
|
||||||
|
|
||||||
@commands.slash_command(
|
@commands.slash_command(
|
||||||
name="suggerer_fonctionnalite",
|
name="suggerer_fonctionnalite",
|
||||||
|
|
@ -471,13 +466,8 @@ class BugReport(commands.Cog):
|
||||||
)
|
)
|
||||||
async def suggerer_fonctionnalite(self, interaction: disnake.ApplicationCommandInteraction):
|
async def suggerer_fonctionnalite(self, interaction: disnake.ApplicationCommandInteraction):
|
||||||
"""Ouvre un formulaire pour suggérer une fonctionnalité."""
|
"""Ouvre un formulaire pour suggérer une fonctionnalité."""
|
||||||
embed = disnake.Embed(
|
modal = FeatureSuggestionModal()
|
||||||
title="💡 Suggérer une Fonctionnalité",
|
await interaction.response.send_modal(modal)
|
||||||
description="Cliquez sur le bouton ci-dessous pour remplir le formulaire de suggestion.",
|
|
||||||
color=disnake.Color.green()
|
|
||||||
)
|
|
||||||
view = FeatureSuggestionView()
|
|
||||||
await interaction.response.send_message(embed=embed, view=view, ephemeral=True)
|
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
def setup(bot):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue