Closed appledora closed 1 year ago
@thieleju I was planning to show the response using an embed using the EmbedBuilder but couldn't make it work. Tried something like below :
const embed = new EmbedBuilder()
.setColor(0xEFFF00)
.setTitle(myres.word)
.setDescription(myres.description);
await interaction.editReply({ embeds: [embed] })
Pointers on this would be helpful!
@appledora Great work! The code in your comment looks like it would work. Did you remember to import the EmbedBuilder Object? :)
const { SlashCommandBuilder, EmbedBuilder } = require("discord.js")
Also a good way to find out whats wrong is to log the error
.catch((error) => {
console.log(error)
interaction.reply(
`No results found for **${term}** or API did not respond.`
)
})
I'd build the embed like this, but feel free to come up with your own if you want :)
@thieleju Updated the embed, had to use srtFields
instead of addField
and that did the trick :D
Added new command /urban
Issue: #83