Interface IInputComponentBuilder
- Namespace
- Discord.Interactions.Builders
- Assembly
- Discord.Net.Interactions.dll
Represent a builder for creating InputComponentInfo.
public interface IInputComponentBuilder
Properties
Attributes
Gets a collection of the attributes of this component.
IReadOnlyCollection<Attribute> Attributes { get; }
Property Value
ComponentType
Gets the component type of this input component.
ComponentType ComponentType { get; }
Property Value
CustomId
Gets the custom id of this input component.
string CustomId { get; }
Property Value
DefaultValue
Gets the default value of this input component.
object DefaultValue { get; }
Property Value
IsRequired
Gets whether this input component is required.
bool IsRequired { get; }
Property Value
Label
Gets the label of this input component.
string Label { get; }
Property Value
Modal
Gets the parent modal of this input component.
ModalBuilder Modal { get; }
Property Value
PropertyInfo
Get the PropertyInfo of this component's property.
PropertyInfo PropertyInfo { get; }
Property Value
Type
Get the reference type of this input component.
Type Type { get; }
Property Value
TypeConverter
Get the ComponentTypeConverter assigned to this input.
ComponentTypeConverter TypeConverter { get; }
Property Value
Methods
SetDefaultValue(object)
Sets DefaultValue.
IInputComponentBuilder SetDefaultValue(object value)
Parameters
value
objectNew value of the DefaultValue.
Returns
- IInputComponentBuilder
The builder instance.
SetIsRequired(bool)
Sets IsRequired.
IInputComponentBuilder SetIsRequired(bool isRequired)
Parameters
isRequired
boolNew value of the IsRequired.
Returns
- IInputComponentBuilder
The builder instance.
WithAttributes(params Attribute[])
Adds attributes to Attributes.
IInputComponentBuilder WithAttributes(params Attribute[] attributes)
Parameters
attributes
Attribute[]New attributes to be added to Attributes.
Returns
- IInputComponentBuilder
The builder instance.
WithCustomId(string)
Sets CustomId.
IInputComponentBuilder WithCustomId(string customId)
Parameters
Returns
- IInputComponentBuilder
The builder instance.
WithLabel(string)
Sets Label.
IInputComponentBuilder WithLabel(string label)
Parameters
Returns
- IInputComponentBuilder
The builder instance.
WithType(Type)
Sets Type.
IInputComponentBuilder WithType(Type type)
Parameters
Returns
- IInputComponentBuilder
The builder instance.