Package net.dv8tion.jda.api.entities
Class Activity.Emoji
- java.lang.Object
-
- net.dv8tion.jda.api.entities.Activity.Emoji
-
- All Implemented Interfaces:
java.util.Formattable,IMentionable,ISnowflake
- Enclosing interface:
- Activity
public static class Activity.Emoji extends java.lang.Object implements ISnowflake, IMentionable
Emoji for a custom status.
This can be a unicode emoji or a custom emoji (Emote).
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetAsCodepoints()The codepoint notation ("U+XXXX") for the unicode of this emoji.java.lang.StringgetAsMention()Retrieve a Mention for this Entity.longgetIdLong()The id for this custom emoji.java.lang.StringgetName()The name of this emoji.inthashCode()booleanisAnimated()Whether this emoji is animated.booleanisEmoji()Whether this is a unicode emoji.booleanisEmote()Whether this is a custom emoji (Emote)java.lang.StringtoString()-
Methods inherited from interface net.dv8tion.jda.api.entities.IMentionable
formatTo
-
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getTimeCreated
-
-
-
-
Method Detail
-
getName
@Nonnull public java.lang.String 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()
-
getAsCodepoints
@Nonnull public java.lang.String getAsCodepoints()
The codepoint notation ("U+XXXX") for the unicode of this emoji. Not available for custom emotes.
-
getIdLong
public long getIdLong()
The id for this custom emoji.- Specified by:
getIdLongin interfaceISnowflake- Returns:
- The emoji id
- Throws:
java.lang.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
@Nonnull public java.lang.String getAsMention()
Description copied from interface:IMentionableRetrieve a Mention for this Entity. For the publicRole(@everyone), this will return the literal string"@everyone".- Specified by:
getAsMentionin interfaceIMentionable- Returns:
- A resolvable mention.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-