Merge branch 'milan' into bodgemaster

master
BodgeMaster 2022-02-20 19:44:59 +01:00
commit 02649a0365
2 changed files with 17 additions and 2 deletions

View File

@ -35,6 +35,7 @@ public class Main {
} }
//Deploy check thread
public static class CheckDeploy extends Thread { public static class CheckDeploy extends Thread {
private int interval; private int interval;
private String id; private String id;

View File

@ -2,6 +2,7 @@ package linux.general.hackyquizbot;
import org.javacord.api.DiscordApi; import org.javacord.api.DiscordApi;
import org.javacord.api.entity.user.User; import org.javacord.api.entity.user.User;
import org.javacord.api.entity.message.embed.EmbedBuilder;
public class Member { public class Member {
private DiscordApi api; private DiscordApi api;
@ -14,10 +15,23 @@ public class Member {
if(event.getMessageContent().equalsIgnoreCase("!trivia")) { if(event.getMessageContent().equalsIgnoreCase("!trivia")) {
if(event.getMessageAuthor().asUser().isPresent()) { if(event.getMessageAuthor().asUser().isPresent()) {
this.user = event.getMessageAuthor().asUser().get(); this.user = event.getMessageAuthor().asUser().get();
this.user.sendMessage("Hi! I'm Hacky! **Fuck you**! :D");
this.user.sendMessage("Welcome to hell");
} }
} }
}); });
} }
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);
}
} }