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()
,
asCustom()
, asRich()
or asApplication()
.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.entities.emoji.Emoji
Emoji.Type
-
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.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
-
asRich
Returns the underlyingRichCustomEmoji
if applicable.- Returns:
- The
RichCustomEmoji
- Throws:
IllegalStateException
- If this is not aRichCustomEmoji
-
asApplication
Returns the underlyingApplicationEmoji
if applicable.- Returns:
- The
ApplicationEmoji
- Throws:
IllegalStateException
- If this is not aApplicationEmoji
-