Prettify
This commit is contained in:
parent
21d8446383
commit
f9093f5681
@ -30,21 +30,18 @@ module.exports = {
|
|||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
})
|
})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
let data = response.body[0]
|
let data = response.body[0]
|
||||||
|
|
||||||
if (isNotDefined(data)){
|
|
||||||
|
|
||||||
return interaction.editReply("Sorry, nothing was found!")
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (isNotDefined(data.phonetics[1])){
|
if (isNotDefined(data)) {
|
||||||
phonetic = ""
|
return interaction.editReply("Sorry, nothing was found!")
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isNotDefined(data.phonetics[1])) {
|
||||||
|
phonetic = ""
|
||||||
} else {
|
} else {
|
||||||
phonetic = data.phonetics[1].text
|
phonetic = data.phonetics[1].text
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let audio = data.phonetics[0].audio
|
let audio = data.phonetics[0].audio
|
||||||
if (!audio) {
|
if (!audio) {
|
||||||
const embed = new EmbedBuilder()
|
const embed = new EmbedBuilder()
|
||||||
|
Loading…
Reference in New Issue
Block a user