Skip to content

DiscordCustomEmoji

Extends

  • LitElement

Constructors

new DiscordCustomEmoji()

new DiscordCustomEmoji(): DiscordCustomEmoji

Returns

DiscordCustomEmoji

Inherited from

LitElement.constructor

Other

customEmojisMap

A map of emoji names and their data name.

This should be keyed as { key: { emojiData } } wherein key should occur in the name.

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.


embedEmoji

Determines whether or not the emoji is used in an embed, or a message. If it is used in an embed, the sizing is adjusted accordingly.


jumbo

Determines whether or not the emoji is of “jumbo size”, This means it is larger and is what Discord uses when the message exclusively has emojis, up to a maximum of 30 emojis.


name

The name of the emoji


url

The emoji URL to use in the message.

updates

willUpdate()

willUpdate(): void

Invoked before update() to compute values needed during the update.

Implement willUpdate to compute property values that depend on other properties and are used in the rest of the update process.

willUpdate(changedProperties) {
// only need to check changed properties for an expensive computation.
if (changedProperties.has('firstName') || changedProperties.has('lastName')) {
this.sha = computeSHA(`${this.firstName} ${this.lastName}`);
}
}
render() {
return html`SHA: ${this.sha}`;
}

Returns

void

Overrides

LitElement.willUpdate