Reputation: 339
As your know, when you type a website address (for ex. https://youtube.com), you also send a Rich Embed message of site automatically. How can I set this for my website?
Upvotes: 22
Views: 67695
Reputation: 725
Put this HTML code at the top of your site.
<title>Website Name</title>
<meta content="Embed Title" property="og:title" />
<meta content="Site Description" property="og:description" />
<meta content="https://embed.com/this-is-the-site-url" property="og:url" />
<meta content="https://embed.com/embedimage.png" property="og:image" />
<meta content="#43B581" data-react-helmet="true" name="theme-color" />
The last one is the color of the embed. It is of note that discord doesn't always update the embed immediately.
If you want the embedded image large (like how YouTube URLs and image hosts look) add
<meta name="twitter:card" content="summary_large_image">
P.S: Don't forget to replace "Website Name" and "Site Description" with the site's name and description.
Upvotes: 51
Reputation: 629
As Skrub said, Discord doesn't always update embed because it keeps in cache the embed content for one URL.
You can however force updating it by providing a different URL, adding an #
or ?a=b
at the end like https://example.com/#a
.
Upvotes: 19