import pingCommand from '../commands/ping.js'; import colorCommand from '../commands/color.js'; const commands = { ping: pingCommand, color: colorCommand, }; export default async function interactionCreateEvent(interaction) { if (!interaction.isChatInputCommand()) return; const command = commands[interaction.commandName]; if (command) { await command.execute(interaction); } }