cleaning output
This commit is contained in:
parent
47cb0dba9a
commit
7b8a015825
@ -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({
|
||||
|
Loading…
Reference in New Issue
Block a user