Migration vers Disnake et ajout des components V2
This commit is contained in:
parent
c8c579eefe
commit
98f7501e07
47 changed files with 1196 additions and 722 deletions
|
|
@ -34,7 +34,7 @@ def save_report(issue_iid, user_id):
|
|||
|
||||
class BugReportModal(disnake.ui.Modal):
|
||||
def __init__(self, priority_choice):
|
||||
super().__init__(title="Signaler un Bug")
|
||||
super().__init__(title="Signaler un Bug", components=[self.bug_title, self.description])
|
||||
self.priority_choice = priority_choice
|
||||
|
||||
bug_title = disnake.ui.TextInput(
|
||||
|
|
@ -46,7 +46,7 @@ class BugReportModal(disnake.ui.Modal):
|
|||
|
||||
description = disnake.ui.TextInput(
|
||||
label="Description détaillée",
|
||||
style=disnake.TextStyle.paragraph,
|
||||
style=disnake.TextInputStyle.paragraph,
|
||||
placeholder="Que s'est-il passé ? Comment reproduire le bug ?",
|
||||
required=True,
|
||||
max_length=1000
|
||||
|
|
@ -77,7 +77,7 @@ class BugReportModal(disnake.ui.Modal):
|
|||
|
||||
class FeatureSuggestionModal(disnake.ui.Modal):
|
||||
def __init__(self):
|
||||
super().__init__(title="Suggérer une fonctionnalité")
|
||||
super().__init__(title="Suggérer une fonctionnalité", components=[self.suggestion_title, self.description])
|
||||
|
||||
suggestion_title = disnake.ui.TextInput(
|
||||
label="Titre de la suggestion",
|
||||
|
|
@ -88,7 +88,7 @@ class FeatureSuggestionModal(disnake.ui.Modal):
|
|||
|
||||
description = disnake.ui.TextInput(
|
||||
label="Détails de la fonctionnalité",
|
||||
style=disnake.TextStyle.paragraph,
|
||||
style=disnake.TextInputStyle.paragraph,
|
||||
placeholder="Décrivez comment cela devrait fonctionner...",
|
||||
required=True,
|
||||
max_length=1000
|
||||
|
|
@ -334,5 +334,5 @@ class BugReport(commands.Cog):
|
|||
async def suggerer_fonctionnalite(self, interaction: disnake.ApplicationCommandInteraction):
|
||||
await interaction.response.send_modal(FeatureSuggestionModal())
|
||||
|
||||
async def setup(bot):
|
||||
await bot.add_cog(BugReport(bot))
|
||||
def setup(bot):
|
||||
bot.add_cog(BugReport(bot))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue