await axios.get(`https://api.genelpara.com/embed/doviz.json`) .then(function (response) { var pairs = response.data; var currencyName = commandName.toUpperCase(); if (pairs.hasOwnProperty(currencyName)) { var current = pairs[currencyName]; const embed = new MessageEmbed() .setColor('#EFFF00') .setTitle(`${currencyName}` + '/TRY') .addFields( { name: 'Satış', value: current.satis }, { name: 'Alış', value: current.alis }, { name: 'Değişim', value: current.degisim }, ); interaction.editReply({ embeds: [embed] }); } else { interaction.editReply(`öyle bi döviz yok.`); } }) .catch(function (error) { console.log(error); }) .then(function () { // always executed });