Use embeds instead of plain messages

This commit is contained in:
fanyx 2024-01-23 16:12:29 +01:00
parent a7183a2ee4
commit 9178994e5e
1 changed files with 12 additions and 3 deletions

View File

@ -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):