Holana/events/interactionCreate.js

13 lines
352 B
JavaScript
Raw Normal View History

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