diff --git a/src/events/interactionCreate/handleCommands.ts b/src/events/interactionCreate/handleCommands.ts index f419413..36de3e1 100644 --- a/src/events/interactionCreate/handleCommands.ts +++ b/src/events/interactionCreate/handleCommands.ts @@ -9,10 +9,13 @@ export default async (client: Client, interaction: Interaction) => { const localCommands = await getLocalCommands() as CommandInterface[]; try { + const commandObject = localCommands.find((cmd) => cmd.name == interaction.commandName); - + if(!commandObject) return; - + + console.log(`/${interaction.commandName} wurde von ${interaction.user.username} ausgeführt!`) + if(commandObject.devOnly){ if(!devs.includes(interaction.user.id)) { interaction.reply({