diff --git a/main.py b/main.py index a9fafb7..6589230 100755 --- a/main.py +++ b/main.py @@ -6,7 +6,7 @@ from yaml import safe_load import discord from discord.ext import commands from discord.ext.commands import Greedy, Context -from discord import app_commands +from discord import app_commands, Embed from src.roles import AddRoleButton, RemoveRoleButton from src.ui import RoleSelectView @@ -33,7 +33,16 @@ roles = app_commands.Group(name="roles", description="Manage role dialogues") ## Group: roles @roles.command(name="create") async def roles_create_button(interaction: discord.Interaction): - await interaction.response.send_message(view=RoleSelectView()) + await interaction.response.send_message( + view=RoleSelectView(), + embed=Embed( + title="Available Roles:", + description="\n".join([ + f"{interaction.client.get_emoji(role['emoji'])} {interaction.guild.get_role(role['id']).mention}" + for role in interaction.client.config['roles'] + ]) + ) + ) # Sync using ,sync ~ @client.command() diff --git a/src/ui.py b/src/ui.py index e667927..8dbd32b 100644 --- a/src/ui.py +++ b/src/ui.py @@ -9,7 +9,7 @@ class RoleSelectView(View): super().__init__(timeout=None) self.add_item( AddRoleButton( - style=ButtonStyle.primary, + style=ButtonStyle.secondary, label="Add Roles", emoji=PartialEmoji.from_str(emojize(":check_mark_button:")), custom_id="role_select:add"