Add interaction event
This commit is contained in:
parent
513244f203
commit
cfd760936c
1 changed files with 13 additions and 0 deletions
13
src/events/interactions/interactionCreate.js
Normal file
13
src/events/interactions/interactionCreate.js
Normal 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);
|
||||
}
|
||||
};
|
Loading…
Reference in a new issue