Skip to content

Commit

Permalink
Improve documentation for reaction events
Browse files Browse the repository at this point in the history
  • Loading branch information
MinnDevelopment committed Feb 23, 2021
1 parent 129c099 commit 7d04625
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public GenericGuildMessageReactionEvent(@Nonnull JDA api, long responseNumber, @
}

/**
* The id for the user who added/removed their reaction.
* The id for the user who owns the reaction.
*
* @return The user id
*/
Expand All @@ -57,7 +57,7 @@ public String getUserId()
}

/**
* The id for the user who added/removed their reaction.
* The id for the user who owns the reaction.
*
* @return The user id
*/
Expand Down Expand Up @@ -116,7 +116,7 @@ public MessageReaction.ReactionEmote getReactionEmote()
}

/**
* Retrieves the {@link User} who added or removed the reaction.
* Retrieves the {@link User} who owns the reaction.
* <br>If a user is known, this will return {@link #getUser()}.
*
* @return {@link RestAction} - Type: {@link User}
Expand All @@ -131,7 +131,7 @@ public RestAction<User> retrieveUser()
}

/**
* Retrieves the {@link Member} who added or removed the reaction.
* Retrieves the {@link Member} who owns the reaction.
* <br>If a member is known, this will return {@link #getMember()}.
*
* <p>Note that banning a member will also fire {@link GuildMessageReactionRemoveEvent} and no member will be available
Expand All @@ -154,7 +154,7 @@ public RestAction<Member> retrieveMember()
* <br>Simple shortcut for {@code getChannel().retrieveMessageById(getMessageId())}.
*
* <p>The {@link Message#getMember() Message.getMember()} method will always return null for the resulting message.
* You can, instead, retrieve the member via {@link #getMember()} or {@link #retrieveMember()}.
* To retrieve the member you can use {@code getGuild().retrieveMember(message.getAuthor())}.
*
* @return {@link RestAction} - Type: {@link Message}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public GenericMessageReactionEvent(@Nonnull JDA api, long responseNumber, @Nulla
}

/**
* The id for the user who added/removed their reaction.
* The id for the user who owns the reaction.
*
* @return The user id
*/
Expand All @@ -61,7 +61,7 @@ public String getUserId()
}

/**
* The id for the user who added/removed their reaction.
* The id for the user who owns reaction.
*
* @return The user id
*/
Expand Down Expand Up @@ -126,7 +126,7 @@ public MessageReaction.ReactionEmote getReactionEmote()
}

/**
* Retrieves the {@link User} who added or removed the reaction.
* Retrieves the {@link User} who owns the reaction.
* <br>If a user is known, this will return {@link #getUser()}.
*
* @return {@link RestAction} - Type: {@link User}
Expand All @@ -142,13 +142,16 @@ public RestAction<User> retrieveUser()
}

/**
* Retrieves the {@link Member} who added or removed the reaction.
* Retrieves the {@link Member} who owns the reaction.
* <br>If a member is known, this will return {@link #getMember()}.
*
* <p>Note that banning a member will also fire {@link MessageReactionRemoveEvent} and no member will be available
* in those cases. An {@link net.dv8tion.jda.api.requests.ErrorResponse#UNKNOWN_MEMBER UNKNOWN_MEMBER} error response
* should be the failure result.
*
* @throws IllegalStateException
* If this event is not from a guild
*
* @return {@link RestAction} - Type: {@link Member}
*/
@Nonnull
Expand All @@ -165,7 +168,7 @@ public RestAction<Member> retrieveMember()
* <br>Simple shortcut for {@code getChannel().retrieveMessageById(getMessageId())}.
*
* <p>The {@link Message#getMember() Message.getMember()} method will always return null for the resulting message.
* You can, instead, retrieve the member via {@link #getMember()} or {@link #retrieveMember()}.
* To retrieve the member you can use {@code getGuild().retrieveMember(message.getAuthor())}.
*
* @return {@link RestAction} - Type: {@link Message}
*/
Expand Down

0 comments on commit 7d04625

Please sign in to comment.