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 underlyingApplicationEmojiif applicable.asCustom()Returns the underlyingCustomEmojiif applicable.asRich()Returns the underlyingRichCustomEmojiif applicable.Returns the underlyingUnicodeEmojiif applicable.Methods inherited from interface net.dv8tion.jda.api.entities.emoji.Emoji
formatTo, getAsReactionCode, getFormatted, getName, getTypeMethods inherited from interface net.dv8tion.jda.api.utils.data.SerializableData
toData
-
Method Details
-
asUnicode
Returns the underlyingUnicodeEmojiif applicable.- Returns:
- The
UnicodeEmoji - Throws:
IllegalStateException- If this is not aUnicodeEmoji
-
asCustom
Returns the underlyingCustomEmojiif applicable.- Returns:
- The
CustomEmoji - Throws:
IllegalStateException- If this is not aCustomEmoji
-
asRich
Returns the underlyingRichCustomEmojiif applicable.- Returns:
- The
RichCustomEmoji - Throws:
IllegalStateException- If this is not aRichCustomEmoji
-
asApplication
Returns the underlyingApplicationEmojiif applicable.- Returns:
- The
ApplicationEmoji - Throws:
IllegalStateException- If this is not aApplicationEmoji
-