@@ -76,7 +76,7 @@ namespace Discord | |||||
AddComponent(cmp, row); | AddComponent(cmp, row); | ||||
break; | break; | ||||
case SelectMenuComponent menu: | case SelectMenuComponent menu: | ||||
WithSelectMenu(menu.Placeholder, menu.CustomId, menu.Options.Select(x => new SelectMenuOptionBuilder(x.Label, x.Value, x.Description, x.Emote, x.Default)).ToList(), menu.Placeholder, menu.MinValues, menu.MaxValues, menu.Disabled, row); | |||||
WithSelectMenu(menu.Placeholder, menu.CustomId, menu.Options.Select(x => new SelectMenuOptionBuilder(x.Label, x.Value, x.Description, x.Emote, x.IsDefault)).ToList(), menu.Placeholder, menu.MinValues, menu.MaxValues, menu.Disabled, row); | |||||
break; | break; | ||||
} | } | ||||
} | } | ||||
@@ -742,7 +742,7 @@ namespace Discord | |||||
MinValues = selectMenu.MinValues; | MinValues = selectMenu.MinValues; | ||||
Disabled = selectMenu.Disabled; | Disabled = selectMenu.Disabled; | ||||
Options = selectMenu.Options? | Options = selectMenu.Options? | ||||
.Select(x => new SelectMenuOptionBuilder(x.Label, x.Value, x.Description, x.Emote, x.Default)) | |||||
.Select(x => new SelectMenuOptionBuilder(x.Label, x.Value, x.Description, x.Emote, x.IsDefault)) | |||||
.ToList(); | .ToList(); | ||||
} | } | ||||
@@ -1028,7 +1028,7 @@ namespace Discord | |||||
Value = option.Value; | Value = option.Value; | ||||
Description = option.Description; | Description = option.Description; | ||||
Emote = option.Emote; | Emote = option.Emote; | ||||
Default = option.Default; | |||||
Default = option.IsDefault; | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
@@ -53,7 +53,7 @@ namespace Discord | |||||
public SelectMenuBuilder ToBuilder() | public SelectMenuBuilder ToBuilder() | ||||
=> new SelectMenuBuilder( | => new SelectMenuBuilder( | ||||
CustomId, | CustomId, | ||||
Options.Select(x => new SelectMenuOptionBuilder(x.Label, x.Value, x.Description, x.Emote, x.Default)).ToList(), | |||||
Options.Select(x => new SelectMenuOptionBuilder(x.Label, x.Value, x.Description, x.Emote, x.IsDefault)).ToList(), | |||||
Placeholder, | Placeholder, | ||||
MaxValues, | MaxValues, | ||||
MinValues, | MinValues, | ||||
@@ -12,29 +12,29 @@ namespace Discord | |||||
public class SelectMenuOption | public class SelectMenuOption | ||||
{ | { | ||||
/// <summary> | /// <summary> | ||||
/// The user-facing name of the option, max 25 characters. | |||||
/// Gets the user-facing name of the option. | |||||
/// </summary> | /// </summary> | ||||
public string Label { get; } | public string Label { get; } | ||||
/// <summary> | /// <summary> | ||||
/// The dev-define value of the option, max 100 characters. | |||||
/// Gets the dev-define value of the option. | |||||
/// </summary> | /// </summary> | ||||
public string Value { get; } | public string Value { get; } | ||||
/// <summary> | /// <summary> | ||||
/// An additional description of the option, max 50 characters. | |||||
/// Gets a description of the option. | |||||
/// </summary> | /// </summary> | ||||
public string Description { get; } | public string Description { get; } | ||||
/// <summary> | /// <summary> | ||||
/// A <see cref="IEmote"/> that will be displayed with this menu option. | |||||
/// Gets the <see cref="IEmote"/> displayed with this menu option. | |||||
/// </summary> | /// </summary> | ||||
public IEmote Emote { get; } | public IEmote Emote { get; } | ||||
/// <summary> | /// <summary> | ||||
/// Will render this option as selected by default. | |||||
/// Gets whether or not this option will render as selected by default. | |||||
/// </summary> | /// </summary> | ||||
public bool? Default { get; } | |||||
public bool? IsDefault { get; } | |||||
internal SelectMenuOption(string label, string value, string description, IEmote emote, bool? defaultValue) | internal SelectMenuOption(string label, string value, string description, IEmote emote, bool? defaultValue) | ||||
{ | { | ||||
@@ -42,7 +42,7 @@ namespace Discord | |||||
Value = value; | Value = value; | ||||
Description = description; | Description = description; | ||||
Emote = emote; | Emote = emote; | ||||
Default = defaultValue; | |||||
IsDefault = defaultValue; | |||||
} | } | ||||
} | } | ||||
} | } |
@@ -52,7 +52,7 @@ namespace Discord.API | |||||
} | } | ||||
} | } | ||||
Default = option.Default.HasValue ? option.Default.Value : Optional<bool>.Unspecified; | |||||
Default = option.IsDefault.HasValue ? option.IsDefault.Value : Optional<bool>.Unspecified; | |||||
} | } | ||||
} | } | ||||
} | } |