Package discord4j.core.object.reaction
Class DefaultReaction
java.lang.Object
discord4j.core.object.reaction.DefaultReaction
- All Implemented Interfaces:
DiscordObject
DefaultReaction is used by
ForumChannel
as an emoji shown as a quick reaction button on the thread in a forum channel.
When selecting an emoji, the user can use it from the forum channel page.-
Constructor Summary
ConstructorDescriptionDefaultReaction
(GatewayDiscordClient gateway, discord4j.discordjson.json.DefaultReactionData data) -
Method Summary
Modifier and TypeMethodDescriptionReturns theGatewayDiscordClient
that created this object.discord4j.discordjson.json.DefaultReactionData
getData()
Gets theDefaultReactionData
associated to this wrapperGets the emoji id if this tag is represented as a custom guild emoji At least this field orgetEmojiName()
is present and filled.Gets the unicode emoji if this tag is represented as a unicode emoji At least this field orgetEmojiId()
is present and filled.
-
Constructor Details
-
DefaultReaction
public DefaultReaction(GatewayDiscordClient gateway, discord4j.discordjson.json.DefaultReactionData data)
-
-
Method Details
-
getClient
Description copied from interface:DiscordObject
Returns theGatewayDiscordClient
that created this object. Methods in it are exclusively based on the entity cache orStore
in use. Refer to callinggetClient().rest()
to access aDiscordClient
that is capable of requesting entities directly from the REST API.- Specified by:
getClient
in interfaceDiscordObject
- Returns:
- The
GatewayDiscordClient
associated to this object.
-
getEmojiId
Gets the emoji id if this tag is represented as a custom guild emoji At least this field orgetEmojiName()
is present and filled.- Returns:
- An
Optional
which may contain a custom guild emoji id.
-
getEmojiName
Gets the unicode emoji if this tag is represented as a unicode emoji At least this field orgetEmojiId()
is present and filled.- Returns:
- An
Optional
which may contain a custom guild emoji id.
-
getData
public discord4j.discordjson.json.DefaultReactionData getData()Gets theDefaultReactionData
associated to this wrapper- Returns:
- the
DefaultReactionData
object wrapped by this object
-