【问题标题】:How to create own embed site for Discord如何为 Discord 创建自己的嵌入网站
【发布时间】:2020-04-07 16:23:56
【问题描述】:

如您所知,当您输入网站地址(例如https://youtube.com)时,您还会自动发送网站的 Rich Embed 消息。如何为我的网站设置此项?

【问题讨论】:

  • 您需要在您的 html 页面中指定元标记。 See an example there
  • @mixno 请不要在 cmets 中回答,但请添加真实答案
  • @TarickWelling 抱歉,我不知道我的答案会作为评论发布。

标签: html embed discord


【解决方案1】:

将此 html 代码放在您网站的顶部。

    <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" />

最后一个是嵌入的颜色。值得注意的是,discord 并不总是立即更新嵌入。

P.S:不要忘记将“网站名称”和“网站描述”替换为网站名称和描述。

【讨论】:

    【解决方案2】:

    正如 Skrub 所说,Discord 并不总是更新嵌入,因为它会缓存一个 URL 的嵌入内容。

    但是,您可以通过提供不同的 URL 来强制更新它,在末尾添加 #?a=b,如 https://example.com/#a

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-12-15
      • 2012-03-08
      • 1970-01-01
      • 2021-10-10
      • 2021-05-16
      • 1970-01-01
      • 1970-01-01
      • 2016-11-29
      相关资源
      最近更新 更多