From 7b8a015825c528c7c51a94cbbd43fb7486e02bb8 Mon Sep 17 00:00:00 2001 From: Raven Scott Date: Sun, 25 Sep 2022 06:45:06 -0400 Subject: [PATCH] cleaning output --- commands/untils/dictionary.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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({