Interface EmojiUnion
- All Superinterfaces:
Emoji
,Formattable
,SerializableData
Represents possible
Emoji
types.
This delegates the emoji methods for some concrete emoji type,
but can be converted to a concrete type using either asUnicode()
or asCustom()
.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.entities.emoji.Emoji
Emoji.Type
-
Method Summary
Modifier and TypeMethodDescriptionasCustom()
Returns the underlyingCustomEmoji
if applicable.Returns the underlyingUnicodeEmoji
if applicable.Methods inherited from interface net.dv8tion.jda.api.entities.emoji.Emoji
formatTo, getAsReactionCode, getFormatted, getName, getType
Methods inherited from interface net.dv8tion.jda.api.utils.data.SerializableData
toData
-
Method Details
-
asUnicode
Returns the underlyingUnicodeEmoji
if applicable.- Returns:
- The
UnicodeEmoji
- Throws:
IllegalStateException
- If this is not aUnicodeEmoji
-
asCustom
Returns the underlyingCustomEmoji
if applicable.- Returns:
- The
CustomEmoji
- Throws:
IllegalStateException
- If this is not aCustomEmoji
-