Holana/events/interactionCreate.js

13 lines
352 B
JavaScript
Raw Normal View History

2021-10-08 16:58:57 -07:00
module.exports = (client, interaction) => {
if (!interaction.isCommand()) return;
const command = client.commands.get(interaction.commandName);
if (!command) return void interaction.reply({
content: `Command \`${interaction.commandName}\` not found.`,
ephemeral: true
});
command.run(client, interaction);
};