Skip to content

Commit

Permalink
refactor: simplify if condition
Browse files Browse the repository at this point in the history
  • Loading branch information
christolis committed Mar 20, 2024
1 parent 1cb934e commit 47cdcb2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ public void onMessageReactionAdd(MessageReactionAddEvent event) {
return;
}

if (isCoolEmoji && originalReactionsCount + 1 >= config.minimumReactions()) {
final int newReactionsCount = originalReactionsCount + 1;
if (isCoolEmoji && newReactionsCount >= config.minimumReactions()) {
event.retrieveMessage().queue(message -> {
message.addReaction(REACT_EMOJI).queue();

Expand Down

0 comments on commit 47cdcb2

Please sign in to comment.