Interface CustomEmoji
- All Superinterfaces:
Emoji,Formattable,IMentionable,ISnowflake,SerializableData
- All Known Subinterfaces:
ApplicationEmoji,RichCustomEmoji
Represents a minimal custom emoji.
This contains the most minimal representation of a custom emoji, via id and name.
This does not represent unicode emojis like they are used in the official client!
The format :smiley: is a client-side alias which is replaced by the unicode emoji, not a custom emoji.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.entities.emoji.Emoji
Emoji.Type -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault voiddefault Stringdefault StringFormatted string used in messages.default ImageProxygetImage()Returns anImageProxyfor this emoji's image.default StringA String representation of the URL which leads to image displayed within the official Discord™ client when this emoji is useddefault Emoji.TypegetType()TheEmoji.Typeof this emoji.booleanWhether this emoji is animated.Methods inherited from interface net.dv8tion.jda.api.entities.emoji.Emoji
getAsReactionCode, getNameMethods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreatedMethods inherited from interface net.dv8tion.jda.api.utils.data.SerializableData
toData
-
Field Details
-
EMOJI_NAME_MAX_LENGTH
static final int EMOJI_NAME_MAX_LENGTH- See Also:
-
ICON_URL
Template forgetImageUrl()- See Also:
-
-
Method Details
-
getType
Description copied from interface:EmojiTheEmoji.Typeof this emoji.- Specified by:
getTypein interfaceEmoji- Returns:
- The
Emoji.Type
-
isAnimated
boolean isAnimated()Whether this emoji is animated.- Returns:
- True, if this emoji is animated
-
getImageUrl
A String representation of the URL which leads to image displayed within the official Discord™ client when this emoji is used- Returns:
- Discord CDN link to the emoji's image
-
getImage
Returns anImageProxyfor this emoji's image.- Returns:
- Never-null
ImageProxyof this emoji's image - See Also:
-
getAsMention
Usable representation of this emoji (used to display in the client just like mentions with a specific format)
Emojis are used with the format<:getName():getId()>- Specified by:
getAsMentionin interfaceIMentionable- Returns:
- A usable String representation for this emoji
- See Also:
-
getFormatted
Description copied from interface:EmojiFormatted string used in messages.
For unicode emoji, this is simplyEmoji.getName(). For custom emoji, this will be the mention markdown format<:name:id>.- Specified by:
getFormattedin interfaceEmoji- Returns:
- The formatted message string
-
formatTo
- Specified by:
formatToin interfaceEmoji- Specified by:
formatToin interfaceFormattable- Specified by:
formatToin interfaceIMentionable
-