Jelajahi Sumber

automatically adding reaction to the embed

baumsplitter41 3 hari lalu
induk
melakukan
00bda5210f
1 mengubah file dengan 5 tambahan dan 0 penghapusan
  1. 5 0
      VPD_BOT/cogs/matesearch.py

+ 5 - 0
VPD_BOT/cogs/matesearch.py

@@ -79,6 +79,11 @@ class Matesearch(commands.Cog):
             await interaction.response.send_message("Your search for players has been submitted.", ephemeral=True)
             search_channel = self._get_channel()
             await search_channel.send(embeds=[embed])
+            try:
+                await embed.add_reaction("✅")
+                await embed.add_reaction("❌")
+            except Exception as e:
+                await interaction.respond(f"Failed to add reaction: {e}", ephemeral=True)
             await search_channel.send(f"<@&{role}>")
 
     #Slash command to trigger the Modal form