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
textDisplayTextDisplayComponent
TextDisplayBuilder(string, int?)
Initializes a new TextDisplayBuilder with the specified content.
public TextDisplayBuilder(string content, int? id = null)
Parameters
Fields
MaxContentLength
The maximum length of the content.
public const int MaxContentLength = 4000
Field Value
Properties
Content
Gets or sets the content of the text display.
public string Content { get; set; }
Property Value
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
Methods
Build()
Runs validation checks and builds the component.
public TextDisplayComponent Build()
Returns
WithContent(string)
Sets the content of the text display.
public TextDisplayBuilder WithContent(string content)
Parameters
contentstring
Returns
- TextDisplayBuilder
The current builder.