Package com.mewna.catnip.entity.misc
Interface Emoji.CustomEmoji
- All Superinterfaces:
Emoji
,Entity
,GuildEntity
,HasGuild
,HasNullableName
,Snowflake
,Timestamped
- All Known Implementing Classes:
CustomEmojiImpl
- Enclosing interface:
- Emoji
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.mewna.catnip.entity.misc.Emoji
Emoji.ActivityEmoji, Emoji.CustomEmoji, Emoji.UnicodeEmoji
Nested classes/interfaces inherited from interface com.mewna.catnip.entity.partials.Timestamped
Timestamped.TimestampStyle
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
custom()
Whether this emoji iscustom
.default String
A string that may be sent in a message and will render this emoji, if the user has permission to.default String
A string that may be added as a reaction to a message, if the user has permission to.default io.reactivex.rxjava3.core.Maybe<Guild>
guild()
Guild that owns this emoji, ornull
if it has no guild.default String
guildId()
ID of guild that owns this emoji, ornull
if it has no guild.long
ID of guild that owns this emoji, or0
if it has no guild.default String
id()
ID of this emoji, or null if it has no ID.default boolean
Checks whether or not this emoji is the provided emoji string.Methods inherited from interface com.mewna.catnip.entity.misc.Emoji
animated, managed, name, requiresColons, roles, unicode, user
Methods inherited from interface com.mewna.catnip.entity.partials.Snowflake
creationTime, creationTimestamp, idAsLong
Methods inherited from interface com.mewna.catnip.entity.partials.Timestamped
asDiscordTimestamp, parseTimestamp
-
Method Details
-
id
Description copied from interface:Emoji
ID of this emoji, or null if it has no ID.
Always null forunicode
emoji. -
guild
Guild that owns this emoji, ornull
if it has no guild.NOTE: This may be null in the case of a reaction, because the data may not be available to get the id for the emoji!
- Specified by:
guild
in interfaceGuildEntity
- Returns:
- String representing the ID.
-
guildId
ID of guild that owns this emoji, ornull
if it has no guild.NOTE: This may be null in the case of a reaction, because the data may not be available to get the id for the emoji!
-
guildIdAsLong
@CheckReturnValue long guildIdAsLong()ID of guild that owns this emoji, or0
if it has no guild.NOTE: This may be null in the case of a reaction, because the data may not be available to get the id for the emoji!
- Specified by:
guildIdAsLong
in interfaceHasGuild
- Returns:
- Long representing the ID.
-
custom
@CheckReturnValue default boolean custom()Description copied from interface:Emoji
Whether this emoji iscustom
. -
forMessage
Description copied from interface:Emoji
A string that may be sent in a message and will render this emoji, if the user has permission to.- Specified by:
forMessage
in interfaceEmoji
- Returns:
- A string that yields this emoji when inside a message.
-
forReaction
Description copied from interface:Emoji
A string that may be added as a reaction to a message, if the user has permission to.- Specified by:
forReaction
in interfaceEmoji
- Returns:
- A string that yields this emoji when added as a reaction.
-
is
Description copied from interface:Emoji
Checks whether or not this emoji is the provided emoji string.
If this emoji isunicode
, it'sname
is compared for equality with the provided string.
If this emoji iscustom
, the following checks, in order, are applied:id
equalityforMessage()
equalityEmoji.forReaction()
forReaction()} equality
-