From d59774b0c21db48693b05ca1803909e399642997 Mon Sep 17 00:00:00 2001 From: BodgeMaster <> Date: Tue, 22 Feb 2022 20:02:16 +0100 Subject: [PATCH] trying to get the thing to add and recognize reactions --- src/main/java/linux/general/hackyquizbot/QuizHandler.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/linux/general/hackyquizbot/QuizHandler.java b/src/main/java/linux/general/hackyquizbot/QuizHandler.java index bb05395..f6454c3 100644 --- a/src/main/java/linux/general/hackyquizbot/QuizHandler.java +++ b/src/main/java/linux/general/hackyquizbot/QuizHandler.java @@ -6,6 +6,8 @@ import org.javacord.api.entity.emoji.Emoji; import org.javacord.api.entity.message.Message; import org.javacord.api.entity.user.User; +import com.vdurmont.emoji.EmojiParser; + import linux.general.hackyquizbot.QuizBackend.Question; public class QuizHandler { @@ -22,9 +24,9 @@ public class QuizHandler { + " Please contact @BodgeMaster#0344 if there are any issues.\n" + "\n" + "Select the :white_check_mark: reaction to continue.").get(); - message.addReaction("✅"); + message.addReaction(EmojiParser.parseToUnicode(":white_check_mark:")); message.addReactionAddListener(event -> { - if (event.getReaction().get().getEmoji().equalsEmoji("✅")) { + if (event.getReaction().get().getEmoji().equalsEmoji(EmojiParser.parseToUnicode(":white_check_mark:"))) { event.getMessage().get().getChannel().sendMessage("test"); } });