Use embeds instead of plain messages
This commit is contained in:
parent
a7183a2ee4
commit
9178994e5e
15
src/roles.py
15
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):
|
||||
|
|
Loading…
Reference in New Issue