Table of Contents

Class DiscordTextInputComponent

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

Represents a text input component that can be submitted. Fires ComponentInteractionCreated event when submitted.

public sealed class DiscordTextInputComponent : DiscordComponent, ILabelComponent
Inheritance
DiscordTextInputComponent
Implements
Inherited Members

Constructors

DiscordTextInputComponent(DiscordTextInputComponent)

Constructs a new text component based on another text component.

DiscordTextInputComponent(TextComponentStyle, string?, string?, int?, int?, bool, string?)

Constructs a new text input component with the specified options.

DiscordTextInputComponent(TextComponentStyle, string, string?, string?, int?, int?, bool, string?)

Constructs a new text input component with the specified options.

Properties

CustomId

The custom Id of this text input component. This is sent back when the form is submitted.

Label

The text description to apply to the text input component.

MaxLength

The maximal length of text input component.

MinLength

The minimal length of text input component. Defaults to 0.

Placeholder

The placeholder for the text input component.

Required

Whether this text input component is required. Defaults to true.

Style

The style of the text input component.

Value

The pre-filled value for the text input component.

Methods

WithId(int)

Assigns a unique id to this component.