Home > Back-end >  How can I set a URL for my description field in discord.js 13 embed?
How can I set a URL for my description field in discord.js 13 embed?

Time:04-14

I wanted to make an embed that contains a description with a URL on it. But I am getting an error:

RangeError [EMBED_DESCRIPTION]: MessageEmbed description must be a string.

My code:

player.on('trackAdd', (queue, track) => {
    const embed = new MessageEmbed()    
    .setTitle('Queued')
    .setDescription({text:`${track.title}`, URL: (`${track.url}`) })
    
    queue.metadata.send({embeds: [embed]});
});

I am using discord.js v13 and node.js v16

CodePudding user response:

You need to provide a string to enter image description here

  • Related