DiscordCustomEmoji
Extends
Section titled “Extends”LitElement
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DiscordCustomEmoji():
DiscordCustomEmoji
Returns
Section titled “Returns”DiscordCustomEmoji
Inherited from
Section titled “Inherited from”LitElement.constructor
customEmojisMap
Section titled “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
Section titled “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.
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.
The name of the emoji
The emoji URL to use in the message.
updates
Section titled “updates”willUpdate()
Section titled “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
Section titled “Returns”void
Overrides
Section titled “Overrides”LitElement.willUpdate