feat(suggestions): the epheremal "suggestion approved" or "suggestion denied" message will now be deleted after 10 seconds
Some checks reported warnings
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
Some checks reported warnings
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
This commit is contained in:
parent
694d8d01de
commit
480ff5915f
1 changed files with 5 additions and 4 deletions
|
@ -1,8 +1,7 @@
|
|||
import datetime
|
||||
import re
|
||||
import typing
|
||||
import discord
|
||||
from redbot.core import app_commands, Config, checks, commands
|
||||
from redbot.core import Config, app_commands, checks, commands
|
||||
from redbot.core.bot import Red
|
||||
|
||||
|
||||
|
@ -638,7 +637,8 @@ class SuggestionApproveModal(discord.ui.Modal, title="Approving suggestion..."):
|
|||
await Suggestions._interaction_finish_suggestion(cog, interaction, self.message, True, self.reason.value)
|
||||
else:
|
||||
await Suggestions._interaction_finish_suggestion(cog, interaction, self.message, True, None)
|
||||
await interaction.response.send_message(content="Suggestion approved!", ephemeral=True)
|
||||
msg = await interaction.response.send_message(content="Suggestion approved!", ephemeral=True)
|
||||
await msg.delete(10)
|
||||
|
||||
class SuggestionDenyModal(discord.ui.Modal, title="Denying suggestion..."):
|
||||
def __init__(self, message):
|
||||
|
@ -659,7 +659,8 @@ class SuggestionDenyModal(discord.ui.Modal, title="Denying suggestion..."):
|
|||
await Suggestions._interaction_finish_suggestion(cog, interaction, self.message, False, self.reason.value)
|
||||
else:
|
||||
await Suggestions._interaction_finish_suggestion(cog, interaction, self.message, False, None)
|
||||
await interaction.response.send_message(content="Suggestion denied!", ephemeral=True)
|
||||
msg: discord.Message = await interaction.response.send_message(content="Suggestion denied!", ephemeral=True)
|
||||
await msg.delete(10)
|
||||
|
||||
@app_commands.context_menu(name="Approve Suggestion")
|
||||
async def approve_context(interaction: discord.Interaction, message: discord.Message):
|
||||
|
|
Loading…
Reference in a new issue