Are 'select menu's supported with modals?
See original GitHub issueI’m trying to display a select menu as a response to a slash command. But getting an exception that says “only text input components are allowed.”. Is this expected? The data structures are there, so the exception got me confused a bit.
Here is a snippet:
await command.RespondWithModalAsync(
new ModalBuilder("Bot Settings", "settings",
new ModalComponentBuilder()
{
ActionRows = new List<ActionRowBuilder>()
{
new ActionRowBuilder()
.WithSelectMenu( new SelectMenuBuilder()
.WithCustomId("alerts")
.WithOptions(new List<SelectMenuOptionBuilder>()
{
new SelectMenuOptionBuilder("Minimal","minimal","Minimum alert level."),
new SelectMenuOptionBuilder("Balanced","balanced","Balanced alert level."),
new SelectMenuOptionBuilder("Verbose","verbose","Verbose alert level."),
}))
,
}
})
.AddTextInput("Time format", "time_format")
.Build());
Exception is thrown here: https://github.com/discord-net/Discord.Net/blob/dev/src/Discord.Net.Core/Entities/Interactions/Modals/ModalBuilder.cs#L124-L125
Issue Analytics
- State:
- Created a year ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Discord Modal with SelectMenu
1 Answer 1 ... Only text inputs are supported on modals. documentation · Share. Share a link to this answer.
Read more >Discord.net Select Menu not visible in Modal : r/discordbots
Discord does not support select menus in modals yet. https://discord.com/developers/docs/interactions/receiving-and-responding#interaction- ...
Read more >We cant received select menus from modal · Issue #8035
Select menus in modals are not yet supported. Discord.js will add full support, once discord considers the feature stable and documented (linked ...
Read more >Modals | discord.js Guide
With modals you can create pop-up forms that allow users to ... We'll cover how to create, show, and receive modal forms using...
Read more >Select Menus - Pycord Guide
Select Menus aren't the only message component in Discord. There's also Buttons and Modal Dialogs. Select Menus make it easy for users to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just leaving this as a note, we have some users who already wrote support for them in modals for DNet, we are simply waiting on Discord to actually release the feature before merging.
Ah, that’s unfortunate. Thanks for clarifying!