Today I did a lot of research on hyperlinks and how to use them. But everything I found didn't work as they were probably outdated…

How can my Discord.js bot send a message with a hyperlink? I know I can use .setTitle("Titel") and .setURL("") to make a link in the embed title, but how can I use these hyperlinks elsewhere in the embed like in a field?

Also, it is possible to create a hyperlink just in a guild channel as a normal user?

Can someone help me in general with hyperlinks, or provide useful documentation which is not outdated?

8

1 Answer

Jakye is right. Only bots can achieve this (but not in field titles, beware). Just do [link text here](url here).

"Track cases globally, or in a country, by supplying 2-letter [country codes]()." 

This embed description results in:

this embed description

this in the embed. Clicking on it directs you to countrycode.org. Using .addField():

yourEmbed.addField("Title here, no hyperlinks allowed", "Main text here, so you can put a hyperlink here [like so.]()"); 

If you want a bot's message to just be a hyperlink, you need to make an embed, and only set the description, hyperlinking as shown above. (you can set the embed color if you want too of course)

3