Class SnowflakeSelectComponentBuilder<TInfo, TBuilder>
- Namespace
- Discord.Interactions.Builders
- Assembly
- Discord.Net.Interactions.dll
Represents a builder for creating SnowflakeSelectComponentInfo.
public abstract class SnowflakeSelectComponentBuilder<TInfo, TBuilder> : InputComponentBuilder<TInfo, TBuilder>, ISnowflakeSelectComponentBuilder, IInputComponentBuilder, IModalComponentBuilder where TInfo : InputComponentInfo where TBuilder : InputComponentBuilder<TInfo, TBuilder>, ISnowflakeSelectComponentBuilder
Type Parameters
TInfoThe SnowflakeSelectComponentInfo this builder yields when built.
TBuilderInherited SnowflakeSelectComponentBuilder<TInfo, TBuilder> type.
- Inheritance
-
ModalComponentBuilder<TInfo, TBuilder>InputComponentBuilder<TInfo, TBuilder>SnowflakeSelectComponentBuilder<TInfo, TBuilder>
- Implements
- Derived
- Inherited Members
Constructors
SnowflakeSelectComponentBuilder(ModalBuilder, ComponentType)
Initialize a new SnowflakeSelectComponentBuilder<TInfo, TBuilder>.
public SnowflakeSelectComponentBuilder(ModalBuilder modal, ComponentType componentType)
Parameters
modalModalBuilderParent modal of this input component.
componentTypeComponentTypeType of this component.
Fields
_defaultValues
protected readonly List<SelectMenuDefaultValue> _defaultValues
Field Value
Properties
DefaultValues
Gets the default value collection for this select component.
public IReadOnlyCollection<SelectMenuDefaultValue> DefaultValues { get; }
Property Value
DefaultValuesType
Gets the default value type of this select component.
public SelectDefaultValueType? DefaultValuesType { get; }
Property Value
MaxValues
Gets the maximum number of values that can be selected.
public int MaxValues { get; set; }
Property Value
MinValues
Gets the minimum number of values that can be selected.
public int MinValues { get; set; }
Property Value
Placeholder
Gets the placeholder text for this select component.
public string Placeholder { get; set; }
Property Value
Methods
AddDefaultValue(SelectMenuDefaultValue)
public TBuilder AddDefaultValue(SelectMenuDefaultValue defaultValue)
Parameters
defaultValueSelectMenuDefaultValue
Returns
- TBuilder
WithComponentType(ComponentType)
Sets ComponentType.
public override TBuilder WithComponentType(ComponentType componentType)
Parameters
componentTypeComponentTypeNew value of the ComponentType.
Returns
- TBuilder
The builder instance.
WithMaxValues(int)
public TBuilder WithMaxValues(int maxValues)
Parameters
maxValuesint
Returns
- TBuilder
WithMinValues(int)
public TBuilder WithMinValues(int minValues)
Parameters
minValuesint
Returns
- TBuilder
WithPlaceholder(string)
public TBuilder WithPlaceholder(string placeholder)
Parameters
placeholderstring
Returns
- TBuilder