Add interaction event

This commit is contained in:
Mylloon 2022-07-03 21:06:34 +02:00
parent 513244f203
commit cfd760936c
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

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);
}
};