Package net.dv8tion.jda.api.entities
Class Activity.Emoji
java.lang.Object
net.dv8tion.jda.api.entities.Activity.Emoji
- All Implemented Interfaces:
Formattable
,IMentionable
,ISnowflake
- Enclosing interface:
- Activity
Emoji for a custom status.
This can be a unicode emoji or a custom emoji (Emote).
This can be a unicode emoji or a custom emoji (Emote).
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
The codepoint notation ("U+XXXX"
) for the unicode of this emoji.Retrieve a Mention for this Entity.long
The id for this custom emoji.getName()
The name of this emoji.int
hashCode()
boolean
Whether this emoji is animated.boolean
isEmoji()
Whether this is a unicode emoji.boolean
isEmote()
Whether this is a custom emoji (Emote)toString()
Methods inherited from interface net.dv8tion.jda.api.entities.IMentionable
formatTo
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getTimeCreated
-
Constructor Details
-
Emoji
-
Emoji
-
-
Method Details
-
getName
The name of this emoji. This will be the unicode characters for a unicode emoji and the name of the custom emote otherwise.- Returns:
- The emoji name
- See Also:
-
getAsCodepoints
The codepoint notation ("U+XXXX"
) for the unicode of this emoji. Not available for custom emotes.- Returns:
- The codepoint notation
- Throws:
IllegalStateException
- IfisEmoji()
is false- See Also:
-
getIdLong
public long getIdLong()The id for this custom emoji.- Specified by:
getIdLong
in interfaceISnowflake
- Returns:
- The emoji id
- Throws:
IllegalStateException
- IfisEmote()
is false
-
isAnimated
public boolean isAnimated()Whether this emoji is animated. This is always false for unicode emoji.- Returns:
- True, if this emoji is animated
-
isEmoji
public boolean isEmoji()Whether this is a unicode emoji.- Returns:
- True, if this is a unicode emoji
-
isEmote
public boolean isEmote()Whether this is a custom emoji (Emote)- Returns:
- True, if this is a custom emoji
-
getAsMention
Description copied from interface:IMentionable
Retrieve a Mention for this Entity. For the publicRole
(@everyone), this will return the literal string"@everyone"
.- Specified by:
getAsMention
in interfaceIMentionable
- Returns:
- A resolvable mention.
-
hashCode
public int hashCode() -
equals
-
toString
-