Class GenericMessageReactionEvent
- java.lang.Object
-
- net.dv8tion.jda.core.events.Event
-
- net.dv8tion.jda.core.events.message.GenericMessageEvent
-
- net.dv8tion.jda.core.events.message.react.GenericMessageReactionEvent
-
- Direct Known Subclasses:
MessageReactionAddEvent
,MessageReactionRemoveEvent
public class GenericMessageReactionEvent extends GenericMessageEvent
Indicates that a MessageReaction was added/removed.
Every MessageReactionEvent is derived from this event and can be casted.Can be used to detect both remove and add events.
-
-
Constructor Summary
Constructors Constructor Description GenericMessageReactionEvent(JDA api, long responseNumber, User user, MessageReaction reaction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Member
getMember()
TheMember
instance for the reacting user ornull
if the reaction was not in a guild.MessageReaction
getReaction()
TheMessageReaction
MessageReaction.ReactionEmote
getReactionEmote()
TheReactionEmote
of the reaction, shortcut forgetReaction().getReactionEmote()
User
getUser()
The reactingUser
-
Methods inherited from class net.dv8tion.jda.core.events.message.GenericMessageEvent
getChannel, getChannelType, getGroup, getGuild, getMessageId, getMessageIdLong, getPrivateChannel, getTextChannel, isFromType
-
Methods inherited from class net.dv8tion.jda.core.events.Event
getJDA, getResponseNumber
-
-
-
-
Constructor Detail
-
GenericMessageReactionEvent
public GenericMessageReactionEvent(JDA api, long responseNumber, User user, MessageReaction reaction)
-
-
Method Detail
-
getMember
public Member getMember()
TheMember
instance for the reacting user ornull
if the reaction was not in a guild.- Returns:
- Member of the reacting user or null
-
getReaction
public MessageReaction getReaction()
TheMessageReaction
- Returns:
- The MessageReaction
-
getReactionEmote
public MessageReaction.ReactionEmote getReactionEmote()
TheReactionEmote
of the reaction, shortcut forgetReaction().getReactionEmote()
- Returns:
- The ReactionEmote instance
-
-