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("https://...")
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?
Just do [link text here](url here) .
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](https://countrycode.org/)."
This embed description results in:
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.](https://example.com)");
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With