blob: df94931ff5e6b1d26c3440b0453e7808e840ab44 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
const { SlashCommand, CommandOptionType } = require('slash-create');
export default class HelloCommand extends SlashCommand {
constructor(creator) {
super(creator, {
name: 'hello',
description: 'Says hello to you.',
options: [{
type: CommandOptionType.STRING,
name: 'food',
description: 'What food do you like?'
}]
});
this.filePath = __filename;
}
async run(ctx) {
return ctx.options.food ? `You like ${ctx.options.food}? Nice!` : `Hello, ${ctx.user.username}!`;
}
}
|