diff --git a/src/Discord.Net.Core/Entities/Interactions/MessageComponents/ComponentBuilder.cs b/src/Discord.Net.Core/Entities/Interactions/MessageComponents/ComponentBuilder.cs index c266da7b2..29ff80cf2 100644 --- a/src/Discord.Net.Core/Entities/Interactions/MessageComponents/ComponentBuilder.cs +++ b/src/Discord.Net.Core/Entities/Interactions/MessageComponents/ComponentBuilder.cs @@ -362,7 +362,7 @@ namespace Discord /// The type of the select menu. /// Menus valid channel types (only for ) /// The current builder. - public ActionRowBuilder WithSelectMenu(string customId, List options, + public ActionRowBuilder WithSelectMenu(string customId, List options = null, string placeholder = null, int minValues = 1, int maxValues = 1, bool disabled = false, ComponentType type = ComponentType.SelectMenu, ChannelType[] channelTypes = null) { @@ -385,7 +385,7 @@ namespace Discord /// The current builder. public ActionRowBuilder WithSelectMenu(SelectMenuBuilder menu) { - if (menu.Options.Distinct().Count() != menu.Options.Count) + if (menu.Options is not null && menu.Options.Distinct().Count() != menu.Options.Count) throw new InvalidOperationException("Please make sure that there is no duplicates values."); var builtMenu = menu.Build();