Refactor command handling to use CommandDefinition type and improve interaction processing
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
import { ChatInputCommandInteraction, SlashCommandBuilder } from "discord.js";
|
||||
import { CommandDefinition } from "../../type";
|
||||
|
||||
export default {
|
||||
const cmd : CommandDefinition = {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName('ping')
|
||||
.setDescription('Pong again!'),
|
||||
async execute(interaction : ChatInputCommandInteraction) {
|
||||
await interaction.reply('Pong !');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default cmd;
|
||||
Reference in New Issue
Block a user