fix missing stuffs

This commit is contained in:
tungdo0602
2025-06-30 21:53:29 +07:00
parent bbd5f3cee5
commit 8b072d8b38
10 changed files with 40 additions and 8 deletions

View File

@@ -4,11 +4,26 @@ const BaseMessageComponent = require('./BaseMessageComponent');
const { MessageComponentTypes } = require('../util/Constants');
class TextDisplayComponent extends BaseMessageComponent {
/**
* @property {String} [content] Text that will be displayed similar to a message
*/
/**
* @param {TextDisplayComponent | APITextDisplayComponent} [data={}]
*/
constructor(data = {}) {
super({ type: 'TEXT_DISPLAY' }, data);
/**
* Text that will be displayed similar to a message
* @type {String}
*/
this.content = data.content ?? null;
}
/**
* @returns {APITextDisplayComponent}
*/
toJSON() {
return {
type: MessageComponentTypes[this.type],