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


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

@@ -12,7 +12,7 @@ namespace Discord
public class MessageComponent
{
/// <summary>
/// The components to be used in a message.
/// Gets the components to be used in a message.
/// </summary>
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;

/// <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>
public string CustomId { get; }

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

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

/// <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>
public int MinValues { get; }

/// <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>
public int MaxValues { get; }

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

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

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

Loading…
Cancel
Save