Interface SingleReactionEvent
-
- All Superinterfaces:
ChannelEvent,Event,MessageEvent,OptionalMessageEvent,ReactionEvent,RequestableMessageEvent,TextChannelEvent,UserEvent
- All Known Subinterfaces:
ReactionAddEvent,ReactionRemoveEvent
public interface SingleReactionEvent extends ReactionEvent, UserEvent
A single reaction event.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<Integer>getCount()Gets the amount of users who used the reaction if the message is cached.EmojigetEmoji()Gets the emoji of the event.Optional<Reaction>getReaction()Gets the reaction if the message is cached and the reaction exists.CompletableFuture<List<User>>getUsers()Gets a list with all users who used the reaction.CompletableFuture<Integer>requestCount()Gets the amount of users who used the reaction.CompletableFuture<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, 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
getMessage, getMessageAttachments, getMessageAuthor, getMessageContent, getReadableMessageContent
-
Methods inherited from interface org.javacord.api.event.message.RequestableMessageEvent
requestMessage
-
Methods inherited from interface org.javacord.api.event.channel.TextChannelEvent
getChannel, getGroupChannel, getPrivateChannel, getServerTextChannel
-
-
-
-
Method Detail
-
getEmoji
Emoji getEmoji()
Gets the emoji of the event.- Returns:
- The emoji.
-
getReaction
Optional<Reaction> getReaction()
Gets the reaction if the message is cached and the reaction exists.- Returns:
- The reaction.
-
requestReaction
CompletableFuture<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
Optional<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
CompletableFuture<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
CompletableFuture<List<User>> getUsers()
Gets a list with all users who used the reaction.- Returns:
- A list with all users who used the reaction.
-
-