Add slash commands support #20

Merged
Anri merged 5 commits from commands into main 2022-07-03 21:09:58 +02:00
Showing only changes of commit cfd760936c - Show all commits

View file

@ -0,0 +1,13 @@
export default (interaction, client) => {
if (interaction.isCommand()) {
const command = client.commands.get(interaction.commandName);
if (!command) {
return interaction.reply({
content: 'Désolé la commande n\'existe probablement plus...',
ephemeral: true,
});
}
return command.interaction(interaction, client);
}
};