@@ -83,12 +83,12 @@ Here's an example `content` command which replies with the content of the target
83
83
<Tabs items = { [' CommonJS' , ' ESM' , ' TypeScript' ]} >
84
84
<Tabs.Tab >
85
85
``` js filename="commands/misc/content.js" copy
86
- const { CommandType } = require (' commandkit ' );
87
-
86
+ const { ApplicationCommandType } = require (" discord.js " );
87
+
88
88
module .exports = {
89
89
data: {
90
90
name: ' content' ,
91
- type: CommandType .Message ,
91
+ type: ApplicationCommandType .Message ,
92
92
},
93
93
94
94
run : ({ interaction, client, handler }) => {
@@ -107,15 +107,15 @@ Here's an example `content` command which replies with the content of the target
107
107
</Tabs.Tab >
108
108
<Tabs.Tab >
109
109
``` js filename="commands/misc/content.js" copy
110
- import { CommandType } from ' commandkit ' ;
110
+ import { ApplicationCommandType } from " discord.js " ;
111
111
112
112
export const data = {
113
113
name: ' content' ,
114
- type: CommandType .Message ,
114
+ type: ApplicationCommandType .Message ,
115
115
}
116
116
117
117
export function run ({ interaction, client, handler }) {
118
- interaction .reply (` The message is: ${ interaction .targetMessage } ` );
118
+ interaction .reply (` The message is: ${ interaction .targetMessage . content } ` );
119
119
}
120
120
121
121
export const options = {
@@ -129,15 +129,16 @@ Here's an example `content` command which replies with the content of the target
129
129
</Tabs.Tab >
130
130
<Tabs.Tab >
131
131
``` ts filename="commands/misc/content.ts" copy
132
- import { CommandType , type CommandData , type ContextMenuCommandProps , type CommandOptions } from ' commandkit' ;
132
+ import { type CommandData , type ContextMenuCommandProps , type CommandOptions } from " commandkit" ;
133
+ import { ApplicationCommandType } from " discord.js" ;
133
134
134
135
export const data: CommandData = {
135
136
name: ' content' ,
136
- type: CommandType .Message ,
137
+ type: ApplicationCommandType .Message ,
137
138
}
138
139
139
140
export function run({ interaction , client , handler }: ContextMenuCommandProps ) {
140
- interaction .reply (` The message is: ${interaction .targetMessage } ` );
141
+ interaction .reply (` The message is: ${interaction .targetMessage . content } ` );
141
142
}
142
143
143
144
export const options: CommandOptions = {
0 commit comments