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 underlyingCustomEmojiif 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
-