Skip to content

DiscordEmbed

Extends

  • LitElement

Implements

Constructors

new DiscordEmbed()

new DiscordEmbed(): DiscordEmbed

Returns

DiscordEmbed

Inherited from

LitElement.constructor

Accessors

authorImage

The author’s avatar URL.


authorName

The author’s name.


authorUrl

The URL to open when you click on the author’s name.


color

The color to use for the embed’s left border. Can be any CSS color value.


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

The embed title.


image

The embed image to use (displayed at the bottom).


lightTheme

Implementation of

LightTheme.lightTheme


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

YouTube

thumbnail

The thumbnail image to use.


url

The URL to open when you click on the embed title.


video

The embed video to use (displayed at the bottom, same slot as the image).

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

https://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_1080p_stereo.ogg