From bd9eae58cded05b710efdb0eb06c62f783e11c66 Mon Sep 17 00:00:00 2001 From: Shwoomple Date: Sun, 20 Feb 2022 23:59:54 +0530 Subject: [PATCH] commit for merge --- .../java/linux/general/hackyquizbot/Main.java | 1 + .../linux/general/hackyquizbot/Member.java | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/main/java/linux/general/hackyquizbot/Main.java b/src/main/java/linux/general/hackyquizbot/Main.java index ac82969..0d79e8d 100644 --- a/src/main/java/linux/general/hackyquizbot/Main.java +++ b/src/main/java/linux/general/hackyquizbot/Main.java @@ -32,6 +32,7 @@ public class Main { } + //Deploy check thread public static class CheckDeploy extends Thread { private int interval; private String id; diff --git a/src/main/java/linux/general/hackyquizbot/Member.java b/src/main/java/linux/general/hackyquizbot/Member.java index 0e18952..bd0ab73 100644 --- a/src/main/java/linux/general/hackyquizbot/Member.java +++ b/src/main/java/linux/general/hackyquizbot/Member.java @@ -2,6 +2,7 @@ package linux.general.hackyquizbot; import org.javacord.api.DiscordApi; import org.javacord.api.entity.user.User; +import org.javacord.api.entity.message.embed.EmbedBuilder; public class Member { private DiscordApi api; @@ -14,10 +15,23 @@ public class Member { if(event.getMessageContent().equalsIgnoreCase("!trivia")) { if(event.getMessageAuthor().asUser().isPresent()) { this.user = event.getMessageAuthor().asUser().get(); - - this.user.sendMessage("Welcome to hell"); + this.user.sendMessage("Hi! I'm Hacky! **Fuck you**! :D"); } } }); } + + public void sendMessage(String question, String[] options) { + String desc = new String(); + + for(String option: options) { + desc += option + "\n"; + } + + EmbedBuilder embed = new EmbedBuilder() + .setTitle(question) + .setDescription(desc); + + this.user.sendMessage(embed); + } }