You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

25 lines
654 B

import { SlashCommand, CommandOptionType, SlashCreator, CommandContext } from 'slash-create';
export default class BotCommand extends SlashCommand {
constructor(creator: SlashCreator) {
super(creator, {
name: 'hello',
description: 'Says hello to you.',
options: [
{
type: CommandOptionType.STRING,
name: 'food',
description: 'What food do you like?'
}
]
});
creator.registerGlobalComponent("hi", (interact) => {
})
}
async run(ctx: CommandContext) {
return ctx.options.food ? `You like ${ctx.options.food}? Nice!` : `Hello, ${ctx.user.username}!`;
}
}