diff --git a/suggestions/suggestions.py b/suggestions/suggestions.py index 678763d..0a9965e 100644 --- a/suggestions/suggestions.py +++ b/suggestions/suggestions.py @@ -663,8 +663,14 @@ class SuggestionDenyModal(discord.ui.Modal, title="Denying suggestion..."): @app_commands.context_menu(name="Approve Suggestion") async def approve_context(interaction: discord.Interaction, message: discord.Message): - await interaction.response.send_modal(SuggestionApproveModal(message)) + if message.author.id == interaction.client.user.id and len(message.embeds) == 1 and message.embeds[0].title.startswith('Suggestion #'): + await interaction.response.send_modal(SuggestionApproveModal(message)) + else: + await interaction.response.send_message(content="This is not a suggestion!", ephemeral=True) @app_commands.context_menu(name="Deny Suggestion") async def deny_context(interaction: discord.Interaction, message: discord.Message): - await interaction.response.send_modal(SuggestionDenyModal(message)) + if message.author.id == interaction.client.user.id and len(message.embeds) == 1 and message.embeds[0].title.startswith('Suggestion #'): + await interaction.response.send_modal(SuggestionDenyModal(message)) + else: + await interaction.response.send_message(content="This is not a suggestion!", ephemeral=True)