Table of Contents

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

IReadOnlyCollection<Attribute>

ComponentType

Gets the component type of this input component.

ComponentType ComponentType { get; }

Property Value

ComponentType

CustomId

Gets the custom id of this input component.

string CustomId { get; }

Property Value

string

DefaultValue

Gets the default value of this input component.

object DefaultValue { get; }

Property Value

object

IsRequired

Gets whether this input component is required.

bool IsRequired { get; }

Property Value

bool

Label

Gets the label of this input component.

string Label { get; }

Property Value

string

Modal

Gets the parent modal of this input component.

ModalBuilder Modal { get; }

Property Value

ModalBuilder

PropertyInfo

Get the PropertyInfo of this component's property.

PropertyInfo PropertyInfo { get; }

Property Value

PropertyInfo

Type

Get the reference type of this input component.

Type Type { get; }

Property Value

Type

TypeConverter

Get the ComponentTypeConverter assigned to this input.

ComponentTypeConverter TypeConverter { get; }

Property Value

ComponentTypeConverter

Methods

SetDefaultValue(object)

IInputComponentBuilder SetDefaultValue(object value)

Parameters

value object

New value of the DefaultValue.

Returns

IInputComponentBuilder

The builder instance.

SetIsRequired(bool)

Sets IsRequired.

IInputComponentBuilder SetIsRequired(bool isRequired)

Parameters

isRequired bool

New 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

customId string

New value of the CustomId.

Returns

IInputComponentBuilder

The builder instance.

WithLabel(string)

Sets Label.

IInputComponentBuilder WithLabel(string label)

Parameters

label string

New value of the Label.

Returns

IInputComponentBuilder

The builder instance.

WithType(Type)

Sets Type.

IInputComponentBuilder WithType(Type type)

Parameters

type Type

New value of the Type.

Returns

IInputComponentBuilder

The builder instance.