UNPKG

v2componentsbuilder

Version:
24 lines (23 loc) 543 B
import { ComponentType } from 'discord-api-types/v10'; export class V2TextDisplayBuilder { constructor(content) { this.content = content; this.type = ComponentType.TextDisplay; return this; } setId(id) { this.id = id; return this; } setContent(content) { this.content = content; return this; } toJSON() { return { id: this.id ?? undefined, type: ComponentType.TextDisplay, content: this.content, }; } }