Holana/events/interactionCreate.js

13 lines
348 B
JavaScript
Raw Normal View History

2023-11-26 09:26:08 +00:00
module.exports = (client, interaction) => {
if (!interaction.isChatInputCommand()) 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);
}