Class InputComponentBuilder<TInfo, TBuilder>
- Namespace
- Discord.Interactions.Builders
- Assembly
- Discord.Net.Interactions.dll
Represents the base builder class for creating InputComponentInfo.
public abstract class InputComponentBuilder<TInfo, TBuilder> : ModalComponentBuilder<TInfo, TBuilder>, IInputComponentBuilder, IModalComponentBuilder where TInfo : InputComponentInfo where TBuilder : InputComponentBuilder<TInfo, TBuilder>
Type Parameters
TInfoThe InputComponentInfo this builder yields when built.
TBuilderInherited InputComponentBuilder<TInfo, TBuilder> type.
- Inheritance
-
ModalComponentBuilder<TInfo, TBuilder>InputComponentBuilder<TInfo, TBuilder>
- Implements
- Derived
- Inherited Members
Properties
CustomId
Gets the custom id of this input component.
public string CustomId { get; set; }
Property Value
Description
Gets the label description of this input component.
public string Description { get; set; }
Property Value
IsRequired
Gets whether this input component is required.
public bool IsRequired { get; set; }
Property Value
Label
Gets the label of this input component.
public string Label { get; set; }
Property Value
TypeConverter
Get the ModalComponentTypeConverter assigned to this input.
public ModalComponentTypeConverter TypeConverter { get; }
Property Value
Methods
SetIsRequired(bool)
Sets IsRequired.
public TBuilder SetIsRequired(bool isRequired)
Parameters
isRequiredboolNew value of the IsRequired.
Returns
- TBuilder
The builder instance.
WithCustomId(string)
Sets CustomId.
public TBuilder WithCustomId(string customId)
Parameters
Returns
- TBuilder
The builder instance.
WithDescription(string)
Sets Description.
public TBuilder WithDescription(string description)
Parameters
descriptionstringNew value of the Description.
Returns
- TBuilder
The builder instance.
WithLabel(string)
Sets Label.
public TBuilder WithLabel(string label)
Parameters
Returns
- TBuilder
The builder instance.
WithType(Type)
Sets Type.
public override TBuilder WithType(Type type)
Parameters
Returns
- TBuilder
The builder instance.