Table of Contents

Class TextDisplayBuilder

Namespace
Discord
Assembly
Discord.Net.Core.dll
public class TextDisplayBuilder : IMessageComponentBuilder
Inheritance
TextDisplayBuilder
Implements
Inherited Members
Extension Methods

Constructors

TextDisplayBuilder()

Initializes a new TextDisplayBuilder.

public TextDisplayBuilder()

TextDisplayBuilder(TextDisplayComponent)

Initializes a new TextDisplayBuilder from existing component.

public TextDisplayBuilder(TextDisplayComponent textDisplay)

Parameters

textDisplay TextDisplayComponent

TextDisplayBuilder(string, int?)

Initializes a new TextDisplayBuilder with the specified content.

public TextDisplayBuilder(string content, int? id = null)

Parameters

content string
id int?

Fields

MaxContentLength

The maximum length of the content.

public const int MaxContentLength = 4096

Field Value

int

Properties

Content

Gets or sets the content of the text display.

public string Content { get; set; }

Property Value

string

Id

Gets or sets the id for the component. An autoincremented id will be assigned if not set.

public int? Id { get; set; }

Property Value

int?

Type

Gets the type of the component.

public ComponentType Type { get; }

Property Value

ComponentType

Methods

Build()

Runs validation checks and builds the component.

public TextDisplayComponent Build()

Returns

TextDisplayComponent

WithContent(string)

Sets the content of the text display.

public TextDisplayBuilder WithContent(string content)

Parameters

content string

Returns

TextDisplayBuilder

The current builder.