UNPKG

seyfert

Version:

The most advanced framework for discord bots

42 lines (41 loc) 1.15 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TextDisplay = void 0; const types_1 = require("../types"); const Base_1 = require("./Base"); /** * Represents a text display component builder. * Used to display simple text content. * @example * ```ts * const text = new TextDisplay().content('Hello, world!'); * ``` */ class TextDisplay extends Base_1.BaseComponentBuilder { /** * Constructs a new TextDisplay component. * @param data Optional initial data for the text display component. */ constructor(data = {}) { super({ type: types_1.ComponentType.TextDisplay, ...data }); } /** * Sets the ID for the text display component. * @param id The ID to set. * @returns The updated TextDisplay instance. */ setId(id) { this.data.id = id; return this; } /** * Sets the text content to display. * @param content The text content. * @returns The updated TextDisplay instance. */ setContent(content) { this.data.content = content; return this; } } exports.TextDisplay = TextDisplay;