Holana/events/interactionCreate.js

13 lines
379 B
JavaScript
Raw Normal View History

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