diff --git a/src/Discord.Net.Core/Entities/Interactions/SlashCommands/SlashCommandBuilder.cs b/src/Discord.Net.Core/Entities/Interactions/SlashCommands/SlashCommandBuilder.cs index e6696bde4..25c1f1dd9 100644 --- a/src/Discord.Net.Core/Entities/Interactions/SlashCommands/SlashCommandBuilder.cs +++ b/src/Discord.Net.Core/Entities/Interactions/SlashCommands/SlashCommandBuilder.cs @@ -100,7 +100,7 @@ namespace Discord { var options = new List(); - Options.ForEach(x => options.Add(x.Build())); + Options.OrderByDescending(x => x.Required ?? false).ToList().ForEach(x => options.Add(x.Build())); props.Options = options; } @@ -378,7 +378,9 @@ namespace Discord Default = Default, Required = Required, Type = Type, - Options = Options?.Count > 0 ? Options.Select(x => x.Build()).ToList() : new List(), + Options = Options?.Count > 0 + ? Options.OrderByDescending(x => x.Required ?? false).Select(x => x.Build()).ToList() + : new List(), Choices = Choices, Autocomplete = Autocomplete, ChannelTypes = ChannelTypes,