Browse Source

update SelectMenuComponent summaries. Rename Disabled to IsDisabled in SelectMenuComponent

pull/1923/head
quin lynch 3 years ago
parent
commit
46c8365a44
4 changed files with 13 additions and 13 deletions
  1. +2
    -2
      src/Discord.Net.Core/Entities/Interactions/Message Components/ComponentBuilder.cs
  2. +1
    -1
      src/Discord.Net.Core/Entities/Interactions/Message Components/MessageComponent.cs
  3. +9
    -9
      src/Discord.Net.Core/Entities/Interactions/Message Components/SelectMenuComponent.cs
  4. +1
    -1
      src/Discord.Net.Rest/API/Common/SelectMenuComponent.cs

+ 2
- 2
src/Discord.Net.Core/Entities/Interactions/Message Components/ComponentBuilder.cs View File

@@ -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.IsDefault)).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.IsDisabled, row);
break; break;
} }
} }
@@ -740,7 +740,7 @@ namespace Discord
CustomId = selectMenu.Placeholder; CustomId = selectMenu.Placeholder;
MaxValues = selectMenu.MaxValues; MaxValues = selectMenu.MaxValues;
MinValues = selectMenu.MinValues; MinValues = selectMenu.MinValues;
Disabled = selectMenu.Disabled;
Disabled = selectMenu.IsDisabled;
Options = selectMenu.Options? Options = selectMenu.Options?
.Select(x => new SelectMenuOptionBuilder(x.Label, x.Value, x.Description, x.Emote, x.IsDefault)) .Select(x => new SelectMenuOptionBuilder(x.Label, x.Value, x.Description, x.Emote, x.IsDefault))
.ToList(); .ToList();


+ 1
- 1
src/Discord.Net.Core/Entities/Interactions/Message Components/MessageComponent.cs View File

@@ -12,7 +12,7 @@ namespace Discord
public class MessageComponent public class MessageComponent
{ {
/// <summary> /// <summary>
/// The components to be used in a message.
/// Gets the components to be used in a message.
/// </summary> /// </summary>
public IReadOnlyCollection<ActionRowComponent> Components { get; } public IReadOnlyCollection<ActionRowComponent> Components { get; }




+ 9
- 9
src/Discord.Net.Core/Entities/Interactions/Message Components/SelectMenuComponent.cs View File

@@ -15,34 +15,34 @@ namespace Discord
public ComponentType Type => ComponentType.SelectMenu; public ComponentType Type => ComponentType.SelectMenu;


/// <summary> /// <summary>
/// The custom id of this Select menu that will be sent with a <see cref="IDiscordInteraction"/>.
/// Gets the custom id of this Select menu that will be sent with a <see cref="IDiscordInteraction"/>.
/// </summary> /// </summary>
public string CustomId { get; } public string CustomId { get; }


/// <summary> /// <summary>
/// The menus options to select from.
/// Gets the menus options to select from.
/// </summary> /// </summary>
public IReadOnlyCollection<SelectMenuOption> Options { get; } public IReadOnlyCollection<SelectMenuOption> Options { get; }


/// <summary> /// <summary>
/// A custom placeholder text if nothing is selected, max 100 characters.
/// Gets the custom placeholder text if nothing is selected.
/// </summary> /// </summary>
public string Placeholder { get; } public string Placeholder { get; }


/// <summary> /// <summary>
/// The minimum number of items that must be chosen; default 1, min 0, max 25
/// Gets the minimum number of items that must be chosen.
/// </summary> /// </summary>
public int MinValues { get; } public int MinValues { get; }


/// <summary> /// <summary>
/// The maximum number of items that can be chosen; default 1, max 25
/// Gets the maximum number of items that can be chosen.
/// </summary> /// </summary>
public int MaxValues { get; } public int MaxValues { get; }


/// <summary> /// <summary>
/// Whether this menu is disabled or not.
/// Gets whether this menu is disabled or not.
/// </summary> /// </summary>
public bool Disabled { get; }
public bool IsDisabled { get; }


/// <summary> /// <summary>
/// Turns this select menu into a builder. /// Turns this select menu into a builder.
@@ -57,7 +57,7 @@ namespace Discord
Placeholder, Placeholder,
MaxValues, MaxValues,
MinValues, MinValues,
Disabled);
IsDisabled);


internal SelectMenuComponent(string customId, List<SelectMenuOption> options, string placeholder, int minValues, int maxValues, bool disabled) internal SelectMenuComponent(string customId, List<SelectMenuOption> options, string placeholder, int minValues, int maxValues, bool disabled)
{ {
@@ -66,7 +66,7 @@ namespace Discord
Placeholder = placeholder; Placeholder = placeholder;
MinValues = minValues; MinValues = minValues;
MaxValues = maxValues; MaxValues = maxValues;
Disabled = disabled;
IsDisabled = disabled;
} }
} }
} }

+ 1
- 1
src/Discord.Net.Rest/API/Common/SelectMenuComponent.cs View File

@@ -40,7 +40,7 @@ namespace Discord.API
Placeholder = component.Placeholder; Placeholder = component.Placeholder;
MinValues = component.MinValues; MinValues = component.MinValues;
MaxValues = component.MaxValues; MaxValues = component.MaxValues;
Disabled = component.Disabled;
Disabled = component.IsDisabled;
} }
} }
} }

Loading…
Cancel
Save