Skip to content

Commit f9e11bd

Browse files
committed
add isRequired mapping to select menus
1 parent 7ac5559 commit f9e11bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Discord.Net.Interactions/Extensions/IDiscordInteractionExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ private static async Task SendModalResponseAsync<T>(IDiscordInteraction interact
9595
break;
9696
case SelectMenuInputComponentInfo selectMenuComponent:
9797
{
98-
var inputBuilder = new SelectMenuBuilder(selectMenuComponent.CustomId, selectMenuComponent.Options.Select(x => new SelectMenuOptionBuilder(x)).ToList(), selectMenuComponent.Placeholder, selectMenuComponent.MaxValues, selectMenuComponent.MinValues, false);
98+
var inputBuilder = new SelectMenuBuilder(selectMenuComponent.CustomId, selectMenuComponent.Options.Select(x => new SelectMenuOptionBuilder(x)).ToList(), selectMenuComponent.Placeholder, selectMenuComponent.MaxValues, selectMenuComponent.MinValues, false, isRequired: selectMenuComponent.IsRequired);
9999

100100
if (modalInstance != null)
101101
{
@@ -108,7 +108,7 @@ private static async Task SendModalResponseAsync<T>(IDiscordInteraction interact
108108
break;
109109
case SnowflakeSelectInputComponentInfo snowflakeSelectComponent:
110110
{
111-
var inputBuilder = new SelectMenuBuilder(snowflakeSelectComponent.CustomId, null, snowflakeSelectComponent.Placeholder, snowflakeSelectComponent.MaxValues, snowflakeSelectComponent.MinValues, false, snowflakeSelectComponent.ComponentType, null, snowflakeSelectComponent.DefaultValues.ToList());
111+
var inputBuilder = new SelectMenuBuilder(snowflakeSelectComponent.CustomId, null, snowflakeSelectComponent.Placeholder, snowflakeSelectComponent.MaxValues, snowflakeSelectComponent.MinValues, false, snowflakeSelectComponent.ComponentType, null, snowflakeSelectComponent.DefaultValues.ToList(), null, snowflakeSelectComponent.IsRequired);
112112

113113
if (modalInstance != null)
114114
{

0 commit comments

Comments
 (0)