Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set embed title to a clickable link

I have a RichEmbed and I want to make it so I can have a field title that when I click on it, it will lead me to a link.

like image 849
Christian Barton Randall Avatar asked Dec 30 '25 01:12

Christian Barton Randall


2 Answers

If you want the title of the embed to be a link, you can add a .url property to it, either by using RichEmbed.setURL(), manually setting it or adding it to the object you pass in the constructor.

If you want the title of a field to be a link that can't be done since that, unfortunately, doesn't support markdown :\
If you want you can add the link in the value text of the field, using markdown:

embed.addField("Field title", "Your text here: [link](http://example.com)")
like image 187
Federico Grandi Avatar answered Jan 01 '26 15:01

Federico Grandi


It's MessageEmbed and this is old now but:

embed.setURL('url here')
like image 27
user13314383 Avatar answered Jan 01 '26 14:01

user13314383



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!