client.on('interactionCreate', async interaction =>{ if(!interaction.isCommand()) return; let name = interaction.commandName; let options = interaction.options; let commandMethod = commands.get(name); if(!commandMethod) return; await interaction.deferReply(); commandMethod(client, interaction) })