declare class TextDisplayBuilder extends ComponentBuilder<APITextDisplayComponent>
Constructors
externaldata?: Partial<APITextDisplayComponent>) constructor(
data?: Partial<APITextDisplayComponent>
Creates a new text display from API data.
Examples:Creating a text display from an API data object:Creating a text display using setters and API data:
const textDisplay = new TextDisplayBuilder({
content: 'some text',
});
const textDisplay = new TextDisplayBuilder({
content: 'old text',
})
.setContent('new text');
protectedreadonlyexternalPartial<APITextDisplayComponent> data :
Clears the id of this component, defaulting to a default incremented id.
Inherited from: ComponentBuilder
external setContentcontent: string) : this (
content: string
Sets the text of this text display.
external toJSONvalidationOverride?: boolean) : APITextDisplayComponent (
validationOverride?: boolean
Serializes this builder to API-compatible JSON data.Note that by disabling validation, there is no guarantee that the resulting object will be valid.