From 9178994e5ee55f34f79fc8a813d4b0595cd66072 Mon Sep 17 00:00:00 2001 From: fanyx Date: Tue, 23 Jan 2024 16:12:29 +0100 Subject: [PATCH] Use embeds instead of plain messages --- src/roles.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/roles.py b/src/roles.py index 4f99442..2923a96 100644 --- a/src/roles.py +++ b/src/roles.py @@ -1,5 +1,6 @@ -from discord import Interaction, SelectOption +from discord import Interaction, SelectOption, Embed, Colour from discord.ui import Button, Select, View +from emoji import emojize class AddRoleSelect(Select): async def callback(self, interaction: Interaction): @@ -14,7 +15,11 @@ class AddRoleSelect(Select): await interaction.response.send_message( ephemeral=True, delete_after=30, - content="Added Roles: " + ", ".join([ role.mention for role in added_roles ]) + embed=Embed( + title=f"{emojize(":check_mark_button:")} Added:", + colour=Colour.green(), + description=", ".join([ role.mention for role in added_roles ]) + ) ) class RemoveRoleSelect(Select): @@ -30,7 +35,11 @@ class RemoveRoleSelect(Select): await interaction.response.send_message( ephemeral=True, delete_after=30, - content="Removed Roles: " + ", ".join([ role.mention for role in removed_roles ]) + embed=Embed( + title=f"{emojize(":cross_mark:")} Removed:", + colour=Colour.red(), + description=", ".join([ role.mention for role in removed_roles ]) + ) ) class AddRoleButton(Button):