File tree 1 file changed +8
-5
lines changed 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 1
-
2
- import { Message } from 'discord.js' ;
1
+ import { SlashCommandBuilder } from '@discordjs/builders' ;
2
+ import { CommandInteraction , Message } from 'discord.js' ;
3
3
import Command from '../Command' ;
4
4
import { BotClient } from '../types' ;
5
5
@@ -8,17 +8,20 @@ import { BotClient } from '../types';
8
8
*/
9
9
export default class ExampleCommand extends Command {
10
10
constructor ( client : BotClient ) {
11
+ const definition = new SlashCommandBuilder ( )
12
+ . setName ( 'example' )
13
+ . setDescription ( 'Does something.' ) ;
11
14
super ( client , {
12
15
name : 'example' ,
13
16
enabled : true ,
14
17
description : 'Does something.' ,
15
18
category : 'Uncategorized' ,
16
19
usage : client . settings . prefix . concat ( 'example' ) ,
17
20
requiredPermissions : [ 'SEND_MESSAGES' ] ,
18
- } ) ;
21
+ } , definition ) ;
19
22
}
20
23
21
- public async run ( message : Message ) : Promise < void > {
22
- await super . respond ( message . channel , 'Whoop!' ) ;
24
+ public async run ( interaction : CommandInteraction ) : Promise < void > {
25
+ await super . respond ( interaction , 'Whoop!' ) ;
23
26
}
24
27
}
You can’t perform that action at this time.
0 commit comments