fix(issues): maybe fixed modals?
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 4s

This commit is contained in:
Seaswimmer 2023-08-18 14:25:39 -04:00
parent 4d21f9c769
commit 88ce09cb2d
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -44,11 +44,11 @@ class Issues(commands.Cog):
@discord.ui.button(label="Bot Bug", style=discord.ButtonStyle.danger, row=0)
async def issue_button_bot_bug(self, interaction: discord.Interaction, button: discord.ui.Button):
await interaction.response.send_modal(Issues.IssuesModal(button_id="bug"))
await interaction.response.send_modal(Issues.IssuesModal(button_id="bot_bug"))
@discord.ui.button(label="Cog Bug", style=discord.ButtonStyle.danger, row=1)
async def issue_button_cog_bug(self, interaction: discord.Interaction, button: discord.ui.Button):
await interaction.response.send_modal(Issues.IssuesModal(button_id="bug"))
await interaction.response.send_modal(Issues.IssuesModal(button_id="cog_bug"))
@discord.ui.button(label="Bot Suggestion", style=discord.ButtonStyle.blurple, row=0)
async def issue_button_bot_suggestion(self, interaction: discord.Interaction, button: discord.ui.Button):
@ -64,11 +64,12 @@ class Issues(commands.Cog):
self.button_id = button_id
self.input_list = []
if self.button_id == "cog_suggestion":
if self.button_id == "cog_suggestion" or self.button_id == "cog_bug":
self.cog_name = discord.ui.TextInput(
label="What cog is your suggestion for?",
placeholder="If unsure, input 'GalaxyCogs'",
style=discord.TextStyle.short,
required=True,
max_length=100
)
self.input_list.append(self.cog_name)
@ -77,14 +78,16 @@ class Issues(commands.Cog):
label="Describe your suggestion.",
placeholder="A clear and concise description of what the suggestion is.",
style=discord.TextStyle.paragraph,
required=True,
max_length=2048
)
self.input_list.append(self.suggestion_description)
if self.button_id == "bug":
if self.button_id == "bot_bug" or self.button_id == "cog_bug":
self.bug_description = discord.ui.TextInput(
label="Describe the bug",
placeholder="A clear and concise description of what the bug is.",
style=discord.TextStyle.paragraph,
required=True,
max_length=2048
)
self.reproduction_steps = discord.ui.TextInput(
@ -106,14 +109,14 @@ class Issues(commands.Cog):
self.input_list.append(self.expected_behavior)
self.additional_context = discord.ui.TextInput(
label="Additional Context",
placeholder=f"Add any other context about the {'problem' if self.button_id == 'bug' else 'feature request'} here.",
placeholder=f"Add any other context about the {'problem' if self.button_id == 'cog_bug' or self.button_id == 'bot_bug' else 'suggestion'} here.",
style=discord.TextStyle.paragraph,
required=False,
max_length=2048
)
self.screenshots = discord.ui.TextInput(
label="Screenshots",
placeholder=f"Add screenshots to help explain your {'problem' if self.button_id == 'bug' else 'feature request'}. Seperate each screenshot with a newline.",
placeholder=f"Add screenshots to help explain your {'problem' if self.button_id == 'cog_bug' or self.button_id == 'bot_bug' else 'suggestion'}. Seperate each screenshot with a newline.",
style=discord.TextStyle.paragraph,
required=False,
max_length=2048