Interface SingleReactionEvent
-
- All Superinterfaces:
ChannelEvent,Event,MessageEvent,OptionalMessageEvent,OptionalUserEvent,ReactionEvent,RequestableMessageEvent,TextChannelEvent
- All Known Subinterfaces:
ReactionAddEvent,ReactionRemoveEvent
public interface SingleReactionEvent extends ReactionEvent, OptionalUserEvent
A single reaction event.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Optional<java.lang.Integer>getCount()Gets the amount of users who used the reaction if the message is cached.EmojigetEmoji()Gets the emoji of the event.java.util.Optional<Reaction>getReaction()Gets the reaction if the message is cached and the reaction exists.java.util.concurrent.CompletableFuture<java.util.Set<User>>getUsers()Gets all users who used the reaction.java.util.concurrent.CompletableFuture<java.lang.Integer>requestCount()Gets the amount of users who used the reaction.java.util.concurrent.CompletableFuture<java.util.Optional<Reaction>>requestReaction()Gets the reaction if it exists.-
Methods inherited from interface org.javacord.api.event.message.MessageEvent
addReactionsToMessage, addReactionsToMessage, addReactionToMessage, addReactionToMessage, deleteMessage, deleteMessage, editMessage, editMessage, editMessage, editMessage, editMessage, getMessageId, getServer, pinMessage, removeAllReactionsFromMessage, removeOwnReactionByEmojiFromMessage, removeOwnReactionByEmojiFromMessage, removeOwnReactionsByEmojiFromMessage, removeOwnReactionsByEmojiFromMessage, removeReactionByEmojiFromMessage, removeReactionByEmojiFromMessage, removeReactionByEmojiFromMessage, removeReactionByEmojiFromMessage, removeReactionsByEmojiFromMessage, removeReactionsByEmojiFromMessage, removeReactionsByEmojiFromMessage, removeReactionsByEmojiFromMessage, unpinMessage
-
Methods inherited from interface org.javacord.api.event.message.OptionalMessageEvent
canYouReadMessageContent, getMessage, getMessageAttachments, getMessageAuthor, getMessageContent, getMessageLink, getReadableMessageContent
-
Methods inherited from interface org.javacord.api.event.user.OptionalUserEvent
getUser, getUserId, getUserIdAsString, requestUser
-
Methods inherited from interface org.javacord.api.event.message.RequestableMessageEvent
requestMessage
-
Methods inherited from interface org.javacord.api.event.channel.TextChannelEvent
getChannel, getPrivateChannel, getServerTextChannel, getServerThreadChannel
-
-
-
-
Method Detail
-
getEmoji
Emoji getEmoji()
Gets the emoji of the event.- Returns:
- The emoji.
-
getReaction
java.util.Optional<Reaction> getReaction()
Gets the reaction if the message is cached and the reaction exists.- Returns:
- The reaction.
-
requestReaction
java.util.concurrent.CompletableFuture<java.util.Optional<Reaction>> requestReaction()
Gets the reaction if it exists. If the message is not cached, it will be requested from Discord first.- Returns:
- The reaction.
- See Also:
RequestableMessageEvent.requestMessage()
-
getCount
java.util.Optional<java.lang.Integer> getCount()
Gets the amount of users who used the reaction if the message is cached.- Returns:
- The amount of users who used the reaction.
-
requestCount
java.util.concurrent.CompletableFuture<java.lang.Integer> requestCount()
Gets the amount of users who used the reaction. If the message is not cached, it will be requested from Discord first.- Returns:
- The amount of users who used the reaction.
- See Also:
RequestableMessageEvent.requestMessage()
-
getUsers
java.util.concurrent.CompletableFuture<java.util.Set<User>> getUsers()
Gets all users who used the reaction.- Returns:
- All users who used the reaction.
-
-