Add Embed with available roles for main dialogue
This commit is contained in:
parent
0499339b00
commit
dfa2ce0eb0
13
main.py
13
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()
|
||||
|
|
Loading…
Reference in New Issue