This commit is contained in:
Ashley Graves 2024-10-15 22:57:47 +02:00
parent e9403a5bc9
commit 7d2b9f51f6
11 changed files with 135 additions and 105 deletions

View file

@ -37,6 +37,8 @@ for (const folder of commandFolders) {
}
client.on(Events.InteractionCreate, async interaction => {
if (!interaction.isAutocomplete() && !interaction.isCommand()) return;
const command = interaction.client.commands.get(interaction.commandName);
if (!command) {
console.error(`No command matching ${interaction.commandName} was found.`);