File tree 3 files changed +25
-50
lines changed
3 files changed +25
-50
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : Text Display
3
+ description : Use the Text Display component using JSX
4
+ ---
5
+
6
+ ## Usage
7
+
8
+ ``` ts title="src/app/commands/ping.tsx"
9
+ import { type ChatInputCommand , TextDisplay } from ' commandkit' ;
10
+ import { MessageFlags } from ' discord.js' ;
11
+
12
+ export const chatInput: ChatInputCommand = async (ctx ) => {
13
+ const textComponent = <TextDisplay content = " This is a text display component" />
14
+
15
+ await ctx.interaction.reply({
16
+ components: [textComponent ],
17
+ flags: MessageFlags .IsComponentsV2 ,
18
+ })
19
+ };
20
+ ```
Original file line number Diff line number Diff line change @@ -22,6 +22,11 @@ const sidebars: SidebarsConfig = {
22
22
//
23
23
] ,
24
24
} ,
25
+ {
26
+ type : 'category' ,
27
+ label : 'Using JSX' ,
28
+ items : [ 'guide/jsx/text-display' ] ,
29
+ } ,
25
30
'guide/using-cli' ,
26
31
'guide/commandkit-config' ,
27
32
'guide/caching' ,
You can’t perform that action at this time.
0 commit comments