Class CustomEmojiImpl
java.lang.Object
net.dv8tion.jda.internal.entities.emoji.CustomEmojiImpl
- All Implemented Interfaces:
Formattable
,CustomEmoji
,Emoji
,EmojiUnion
,IMentionable
,ISnowflake
,SerializableData
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.entities.emoji.Emoji
Emoji.Type
-
Field Summary
Fields inherited from interface net.dv8tion.jda.api.entities.emoji.CustomEmoji
EMOJI_NAME_MAX_LENGTH, ICON_URL
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the underlyingApplicationEmoji
if applicable.asCustom()
Returns the underlyingCustomEmoji
if applicable.asRich()
Returns the underlyingRichCustomEmoji
if applicable.Returns the underlyingUnicodeEmoji
if applicable.boolean
The reaction code for this emoji.Formatted string used in messages.long
The Snowflake id of this entity.getName()
The name of this emoji.int
hashCode()
boolean
Whether this emoji is animated.toData()
SerializedDataObject
for this object.toString()
Methods inherited from interface net.dv8tion.jda.api.entities.emoji.CustomEmoji
formatTo, getImage, getImageUrl, getType
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getTimeCreated
-
Constructor Details
-
CustomEmojiImpl
-
-
Method Details
-
getAsReactionCode
Description copied from interface:Emoji
The reaction code for this emoji.
For unicode emojis this will be the unicode of said emoji rather than an alias like:smiley:
.
For custom emojis this will be the name and id of said emoji in the format<name>:<id>
.- Specified by:
getAsReactionCode
in interfaceEmoji
- Returns:
- The unicode if it is an emoji, or the name and id in the format
<name>:<id>
-
getName
Description copied from interface:Emoji
The name of this emoji.
This will be the unicode characters if this emoji is not ofEmoji.getType()
CUSTOM
. -
getIdLong
public long getIdLong()Description copied from interface:ISnowflake
The Snowflake id of this entity. This is unique to every entity and will never change.- Specified by:
getIdLong
in interfaceISnowflake
- Returns:
- Long containing the Id.
-
isAnimated
public boolean isAnimated()Description copied from interface:CustomEmoji
Whether this emoji is animated.- Specified by:
isAnimated
in interfaceCustomEmoji
- Returns:
- True, if this emoji is animated
-
toData
Description copied from interface:SerializableData
SerializedDataObject
for this object.- Specified by:
toData
in interfaceSerializableData
- Returns:
DataObject
-
getAsMention
Description copied from interface:CustomEmoji
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 interfaceCustomEmoji
- 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 interfaceCustomEmoji
- Specified by:
getFormatted
in interfaceEmoji
- Returns:
- The formatted message string
-
hashCode
public int hashCode() -
equals
-
toString
-
asUnicode
Description copied from interface:EmojiUnion
Returns the underlyingUnicodeEmoji
if applicable.- Specified by:
asUnicode
in interfaceEmojiUnion
- Returns:
- The
UnicodeEmoji
-
asCustom
Description copied from interface:EmojiUnion
Returns the underlyingCustomEmoji
if applicable.- Specified by:
asCustom
in interfaceEmojiUnion
- Returns:
- The
CustomEmoji
-
asRich
Description copied from interface:EmojiUnion
Returns the underlyingRichCustomEmoji
if applicable.- Specified by:
asRich
in interfaceEmojiUnion
- Returns:
- The
RichCustomEmoji
-
asApplication
Description copied from interface:EmojiUnion
Returns the underlyingApplicationEmoji
if applicable.- Specified by:
asApplication
in interfaceEmojiUnion
- Returns:
- The
ApplicationEmoji
-