Table of Contents

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

TInfo

The InputComponentInfo this builder yields when built.

TBuilder

Inherited 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

string

Description

Gets the label description of this input component.

public string Description { get; set; }

Property Value

string

IsRequired

Gets whether this input component is required.

public bool IsRequired { get; set; }

Property Value

bool

Label

Gets the label of this input component.

public string Label { get; set; }

Property Value

string

TypeConverter

Get the ModalComponentTypeConverter assigned to this input.

public ModalComponentTypeConverter TypeConverter { get; }

Property Value

ModalComponentTypeConverter

Methods

SetIsRequired(bool)

Sets IsRequired.

public TBuilder SetIsRequired(bool isRequired)

Parameters

isRequired bool

New value of the IsRequired.

Returns

TBuilder

The builder instance.

WithCustomId(string)

Sets CustomId.

public TBuilder WithCustomId(string customId)

Parameters

customId string

New value of the CustomId.

Returns

TBuilder

The builder instance.

WithDescription(string)

public TBuilder WithDescription(string description)

Parameters

description string

New value of the Description.

Returns

TBuilder

The builder instance.

WithLabel(string)

Sets Label.

public TBuilder WithLabel(string label)

Parameters

label string

New value of the Label.

Returns

TBuilder

The builder instance.

WithType(Type)

Sets Type.

public override TBuilder WithType(Type type)

Parameters

type Type

New value of the Type.

Returns

TBuilder

The builder instance.