Skip to content

Commit 1cb934e

Browse files
committed
feat: add extra condition which asserts emoji equality
1 parent 787d3c5 commit 1cb934e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

application/src/main/java/org/togetherjava/tjbot/features/basic/CoolMessagesBoardManager.java

+4
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ private static MessageEmbed createQuoteEmbed(Message message) {
123123
* Checks a {@link MessageReaction} to see if the bot has reacted to it.
124124
*/
125125
private static boolean hasBotReacted(JDA jda, MessageReaction messageReaction) {
126+
if (!REACT_EMOJI.equals(messageReaction.getEmoji())) {
127+
return false;
128+
}
129+
126130
return messageReaction.retrieveUsers()
127131
.parallelStream()
128132
.anyMatch(user -> jda.getSelfUser().getIdLong() == user.getIdLong());

0 commit comments

Comments
 (0)