diff --git a/src/main/java/linux/general/hackyquizbot/QuizHandler.java b/src/main/java/linux/general/hackyquizbot/QuizHandler.java index f27374f..1fdb128 100644 --- a/src/main/java/linux/general/hackyquizbot/QuizHandler.java +++ b/src/main/java/linux/general/hackyquizbot/QuizHandler.java @@ -2,7 +2,6 @@ package linux.general.hackyquizbot; import java.util.concurrent.ExecutionException; -import org.javacord.api.entity.emoji.Emoji; import org.javacord.api.entity.message.Message; import org.javacord.api.entity.user.User; @@ -26,9 +25,10 @@ public class QuizHandler { + "Select the :white_check_mark: reaction to continue.").get(); message.addReaction(EmojiParser.parseToUnicode(":white_check_mark:")); message.addReactionAddListener(event -> { - System.err.println("Received a reaction"); - if (event.getReaction().get().getEmoji().equalsEmoji(EmojiParser.parseToUnicode(":white_check_mark:"))) { + if (!event.getUser().get().isYourself() && event.getReaction().get().getEmoji().equalsEmoji(EmojiParser.parseToUnicode(":white_check_mark:"))) { event.getMessage().get().getChannel().sendMessage("test"); + //TODO: trigger question dispatch + //TODO: remove ReactionAddListener } }); } catch (InterruptedException | ExecutionException e) {