Class ReactionAddEvent


  • public class ReactionAddEvent
    extends MessageEvent
    Dispatched when a reaction is added to a message.

    guildId may not be present if the message was in a private channel.

    This event is dispatched by Discord.

    See Also:
    Message Reaction Add
    • Method Detail

      • getUserId

        public Snowflake getUserId()
        Gets the Snowflake ID of the User who added a reaction in this event.
        Returns:
        The Id of the User who added a reaction.
      • getUser

        public Mono<User> getUser()
        Requests to retrieve the User who added a reaction in this event.
        Returns:
        A Mono where, upon successful completion, emits the User that has added the reaction. If an error is received, it is emitted through the Mono.
      • getMessageId

        public Snowflake getMessageId()
        Gets the Snowflake ID of the Message the reaction was added to in this event.
        Returns:
        The ID of the Message the reaction was added to.
      • getMessage

        public Mono<Message> getMessage()
        Request to retrieve the Message the reaction was added to in this event.
        Returns:
        A Mono where, upon successful completion, emits the Message the reaction was added to. If an error is received, it is emitted through the Mono.
      • getGuildId

        public Optional<Snowflake> getGuildId()
        Gets the Snowflake ID of the Guild containing the Message and Reaction, if present. This may not be available if the reaction is to a Message in a private channel.
        Returns:
        The ID of the Guild involved in the event, if present.
      • getGuild

        public Mono<Guild> getGuild()
        Request to retrieve the Guild containing the Message and reaction, if present. This may not be available if the reaction is to a Message in a private channel.
        Returns:
        A Mono where, upon successful completion, emits the Guild containing the Message involved, if present. If an error is received, it is emitted through the Mono.
      • getMember

        public Optional<Member> getMember()
        Gets the member who reacted, if present. This may not be available if the reaction is to a Message in a private channel.
        Returns:
        The member who reacted, if present.