diff --git a/src/events/interactions/interactionCreate.js b/src/events/interactions/interactionCreate.js new file mode 100644 index 0000000..bfc98af --- /dev/null +++ b/src/events/interactions/interactionCreate.js @@ -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); + } +};