fix(issues): fixed some minor issues with the approve/deny system
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 4s

This commit is contained in:
Seaswimmer 2023-08-18 17:57:25 -04:00
parent 1581c267b9
commit e19143de18
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -164,7 +164,7 @@ class Issues(commands.Cog):
async def issue_response_button_approve(self, interaction: discord.Interaction, button: discord.ui.Button):
await interaction.response.send_modal(Issues.IssueResponseModal(self.channel, self.message_id, self.user, True))
@discord.ui.button(label="Deny", style=discord.ButtonStyle.green)
@discord.ui.button(label="Deny", style=discord.ButtonStyle.danger)
async def issue_response_button_deny(self, interaction: discord.Interaction, button: discord.ui.Button):
await interaction.response.send_modal(Issues.IssueResponseModal(self.channel, self.message_id, self.user, False))
@ -195,7 +195,7 @@ class Issues(commands.Cog):
embed.color = 15671552
embed.title = "Issue Request Denied"
await interaction.response.send_message(content="Issue request denied.", ephemeral=True)
if self.response is not None:
embed.add_field(name=f"Response from {interaction.user.name}", value=self.response.value)
await message.edit(embed=embed)
if self.response.value is not None:
embed.add_field(name=f"Response from {interaction.user.name}", value=self.response.value, inline=False)
await message.edit(embed=embed, view=None)
await self.user.send(embed=embed)