Class MessageReactionAddEvent
java.lang.Object
net.dv8tion.jda.api.events.Event
net.dv8tion.jda.api.events.message.GenericMessageEvent
net.dv8tion.jda.api.events.message.react.GenericMessageReactionEvent
net.dv8tion.jda.api.events.message.react.MessageReactionAddEvent
- All Implemented Interfaces:
GenericEvent
Indicates that a user added a reaction to a message
This includes unicode and custom emoji
This includes unicode and custom emoji
Can be used to track when a user adds a reaction to a message
Requirements
This event requires at least one of the following intents (Will not fire at all if neither is enabled):
GUILD_MESSAGE_REACTIONSto work in guild text channelsDIRECT_MESSAGE_REACTIONSto work in private channels
-
Constructor Summary
ConstructorsConstructorDescriptionMessageReactionAddEvent(JDA api, long responseNumber, User user, Member member, MessageReaction reaction, long userId, long messageAuthorId) -
Method Summary
Modifier and TypeMethodDescriptionThe user id of the original message author.longThe user id of the original message author.Methods inherited from class GenericMessageReactionEvent
getEmoji, getMember, getReaction, getUser, getUserId, getUserIdLong, retrieveMember, retrieveMessage, retrieveUserMethods inherited from class GenericMessageEvent
getChannel, getChannelType, getGuild, getGuildChannel, getJumpUrl, getMessageId, getMessageIdLong, isFromGuild, isFromThread, isFromTypeMethods inherited from class Event
getJDA, getRawData, getResponseNumber, toString
-
Constructor Details
-
MessageReactionAddEvent
public MessageReactionAddEvent(@Nonnull JDA api, long responseNumber, @Nullable User user, @Nullable Member member, @Nonnull MessageReaction reaction, long userId, long messageAuthorId)
-
-
Method Details
-
getMessageAuthorId
The user id of the original message author.
This might be 0 for webhook messages.- Returns:
- The user id of the original message author.
-
getMessageAuthorIdLong
public long getMessageAuthorIdLong()The user id of the original message author.
This might be 0 for webhook messages.- Returns:
- The user id of the original message author.
-