...
var selectMenu = new SelectMenuBuilder()
{
Placeholder = "SelectMenu",
CustomId = "select_menu"
};
selectMenu
.AddOption(
"First Option",
"first_option",
"First Option!",
Emoji.Parse("")
)
.AddOption("Second Option", "second_option");
var component = new ComponentBuilder();
component
.WithButton(button)
.WithSelectMenu(selectMenu);
await RespondAsync(
embed: embed.Build(),
ephemeral: true,
components: component.Build()
);
[ComponentInteraction("select_menu")]
public async Task SelectMenuResponding(SocketMessageComponent arg)
{
var value = arg.Data.Values;
switch (value)
{
case "first_option":
await RespondAsync("hello");
break;
}
}