Compare commits
3 Commits
38803d519d
...
4222046c20
Author | SHA1 | Date |
---|---|---|
BodgeMaster | 4222046c20 | |
BodgeMaster | d59774b0c2 | |
BodgeMaster | a4a004cf94 |
5
pom.xml
5
pom.xml
|
@ -18,6 +18,11 @@
|
|||
<artifactId>mariadb-java-client</artifactId>
|
||||
<version>3.0.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.vdurmont</groupId>
|
||||
<artifactId>emoji-java</artifactId>
|
||||
<version>5.1.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
|
|
|
@ -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,10 @@ 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("✅")) {
|
||||
System.err.println("Received a reaction");
|
||||
if (event.getReaction().get().getEmoji().equalsEmoji(EmojiParser.parseToUnicode(":white_check_mark:"))) {
|
||||
event.getMessage().get().getChannel().sendMessage("test");
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue