DiscordEmbed
Extends
Section titled “Extends”LitElement
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DiscordEmbed():
DiscordEmbed
Returns
Section titled “Returns”DiscordEmbed
Inherited from
Section titled “Inherited from”LitElement.constructor
Accessors
Section titled “Accessors”authorImage
Section titled “authorImage”The author’s avatar URL.
authorName
Section titled “authorName”The author’s name.
authorUrl
Section titled “authorUrl”The URL to open when you click on the author’s name.
The color to use for the embed’s left border. Can be any CSS color value.
embedEmojisMap
Section titled “embedEmojisMap”An emoji that is prefixed to embedTitle.
This should be keyed as { key: { emojiData } }
wherein key
should occur in the embedTitle.
By default this component will use the global emojis from getGlobalEmojiUrl, however on SSR frameworks like Nuxt 3 global config doesn’t work so we provide this as an alternative method.
embedTitle
Section titled “embedTitle”The embed title.
The embed image to use (displayed at the bottom).
lightTheme
Section titled “lightTheme”Implementation of
Section titled “Implementation of”provider
Section titled “provider”The provider to show above the embed, for example for YouTube videos it will show “YouTube” at the top of the embed (above the author)
Example
Section titled “Example”YouTube
thumbnail
Section titled “thumbnail”The thumbnail image to use.
The URL to open when you click on the embed title.
The embed video to use (displayed at the bottom, same slot as the image).
Remarks
Section titled “Remarks”- YouTube videos will not be playable on your projects, this is due to YouTube using DASH to play their videos rather than providing the raw media stream (in a container such as mp4 or ogg). Links to regular MP4 files (such as on a CDN) however will autoplay!
- Video takes priority over image.
- Providing both a video and an image will ensure the image is shown to users with browsers that do not support HTML5 video playback.
Example
Section titled “Example”https://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_1080p_stereo.ogg