diff --git a/commands/untils/dictionary.js b/commands/untils/dictionary.js index 0352e63..a2d147b 100644 --- a/commands/untils/dictionary.js +++ b/commands/untils/dictionary.js @@ -31,12 +31,11 @@ module.exports = { }) .then((response) => { let data = response.body[0] - console.log(data.meanings) if (isNotDefined(data)) { return interaction.editReply("Sorry, nothing was found!") } - if (isNotDefined(data.phonetics)) { + if (isNotDefined(data.phonetics[1])) { phonetic = "" } else { phonetic = data.phonetics[1].text @@ -62,7 +61,7 @@ module.exports = { const embed = new EmbedBuilder() .setColor("#FF0000") - .setTitle("Results for " + word + ": " + phonetic) + .setTitle(word + ": " + phonetic) .addFields(meaningsArray) .setTimestamp() .setFooter({ @@ -99,13 +98,12 @@ module.exports = { }) } }); - console.log(data) const file = new AttachmentBuilder('./audio/' + rand + ".mp3"); const embed = new EmbedBuilder() .setColor("#FF0000") - .setTitle("Results for " + word + ": " + phonetic) + .setTitle(word + ": " + phonetic) .addFields(meaningsArray) .setTimestamp() .setFooter({