Table of Contents

Class TextInputProperties

Namespace
NetCord.Rest
Assembly
NetCord.dll
public class TextInputProperties : ComponentProperties
Inheritance
TextInputProperties
Inherited Members

Constructors

TextInputProperties(string, TextInputStyle, string)

public TextInputProperties(string customId, TextInputStyle style, string label)

Parameters

customId string
style TextInputStyle
label string

Properties

ComponentType

Type of the component.

public override ComponentType ComponentType { get; }

Property Value

ComponentType

CustomId

[JsonPropertyName("custom_id")]
public string CustomId { get; set; }

Property Value

string

Label

[JsonPropertyName("label")]
public string Label { get; set; }

Property Value

string

MaxLength

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("max_length")]
public int? MaxLength { get; set; }

Property Value

int?

MinLength

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("min_length")]
public int? MinLength { get; set; }

Property Value

int?

Placeholder

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("placeholder")]
public string? Placeholder { get; set; }

Property Value

string

Required

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("required")]
public bool? Required { get; set; }

Property Value

bool?

Style

[JsonPropertyName("style")]
public TextInputStyle Style { get; set; }

Property Value

TextInputStyle

Value

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("value")]
public string? Value { get; set; }

Property Value

string

Methods

WithCustomId(string)

public TextInputProperties WithCustomId(string customId)

Parameters

customId string

Returns

TextInputProperties

WithLabel(string)

public TextInputProperties WithLabel(string label)

Parameters

label string

Returns

TextInputProperties

WithMaxLength(int?)

public TextInputProperties WithMaxLength(int? maxLength)

Parameters

maxLength int?

Returns

TextInputProperties

WithMinLength(int?)

public TextInputProperties WithMinLength(int? minLength)

Parameters

minLength int?

Returns

TextInputProperties

WithPlaceholder(string?)

public TextInputProperties WithPlaceholder(string? placeholder)

Parameters

placeholder string

Returns

TextInputProperties

WithRequired(bool?)

public TextInputProperties WithRequired(bool? required = true)

Parameters

required bool?

Returns

TextInputProperties

WithStyle(TextInputStyle)

public TextInputProperties WithStyle(TextInputStyle style)

Parameters

style TextInputStyle

Returns

TextInputProperties

WithValue(string?)

public TextInputProperties WithValue(string? value)

Parameters

value string

Returns

TextInputProperties