Skip to main content
Version: 1.x

Text Display

The TextDisplay component is the most basic component that allows you to show text content in your Discord messages.

Basic usage

src/app/commands/text-example.tsx
import { type ChatInputCommand, TextDisplay } from 'commandkit';
import { MessageFlags } from 'discord.js';

export const chatInput: ChatInputCommand = async ({ interaction }) => {
const textComponent = <TextDisplay content="Hello, world!" />;

await interaction.reply({
components: [textComponent],
flags: MessageFlags.IsComponentsV2,
});
};