Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

246
Views
How can I set a URL for my description field in discord.js 13 embed?

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

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

You need to provide a string to setDescription, it won't accept an object.

You can use Markdown syntax to create a link though:

.setDescription(`[${track.text}](${track.url})`)

It will display a link where the URL is track.url and the link is track.text.

about 4 years ago · Juan Pablo Isaza Report

0

According to the discord.js guide, you can use embed.setURL('https://somedomain.tld') to achieve what you want.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!