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.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.entities.emoji.Emoji
Emoji.Type
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
default String
default String
Formatted string used in messages.default ImageProxy
getImage()
Returns anImageProxy
for this emoji's image.default String
A String representation of the URL which leads to image displayed within the official Discord™ client when this emoji is useddefault Emoji.Type
getType()
TheEmoji.Type
of this emoji.boolean
Whether this emoji is animated.Methods inherited from interface net.dv8tion.jda.api.entities.emoji.Emoji
getAsReactionCode, getName
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
Methods 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:Emoji
TheEmoji.Type
of this emoji.- Specified by:
getType
in 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 anImageProxy
for this emoji's image.- Returns:
- Never-null
ImageProxy
of 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:
getAsMention
in interfaceIMentionable
- Returns:
- A usable String representation for this emoji
- See Also:
-
getFormatted
Description copied from interface:Emoji
Formatted 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:
getFormatted
in interfaceEmoji
- Returns:
- The formatted message string
-
formatTo
- Specified by:
formatTo
in interfaceEmoji
- Specified by:
formatTo
in interfaceFormattable
- Specified by:
formatTo
in interfaceIMentionable
-