Compare commits
2 Commits
aa0bcd3e99
...
a97424041c
Author | SHA1 | Date |
---|---|---|
![]() |
a97424041c | |
![]() |
9f4421f448 |
|
@ -16,15 +16,13 @@ public class Main {
|
||||||
// [0] token, [1] db username, [2] db password
|
// [0] token, [1] db username, [2] db password
|
||||||
commandLineArguments = args;
|
commandLineArguments = args;
|
||||||
|
|
||||||
// CREATE TABLE questions(id INT(32) AUTO_INCREMENT PRIMARY KEY, question TEXT, max_score INT(8));
|
|
||||||
// CREATE TABLE answer_coices(id INT(32), answer VARCHAR(2048), correctness BOOLEAN);
|
|
||||||
// CREATE TABLE user_answers(id INT(32), given_answer VARCHAR(2048), discord_user VARCHAR(1024));
|
|
||||||
// CREATE TABLE categories(id INT(32), category VARCHAR(1024));
|
|
||||||
|
|
||||||
// checks every 7500 ms if a deployment happened, if so shuts down the bot
|
// checks every 7500 ms if a deployment happened, if so shuts down the bot
|
||||||
CheckDeploy check = new CheckDeploy(7500, "/var/www/deployment/Hacky-Quizbot/id.txt");
|
CheckDeploy check = new CheckDeploy(7500, "/var/www/deployment/Hacky-Quizbot/id.txt");
|
||||||
check.start();
|
check.start();
|
||||||
|
|
||||||
|
//TODO: remove, this is just a way to force loading of the QuizBackend class while it isn’t being loaded automatically
|
||||||
|
QuizBackend backend = new QuizBackend();
|
||||||
|
|
||||||
DiscordApi api = new DiscordApiBuilder().setToken(commandLineArguments[0]).login().join();
|
DiscordApi api = new DiscordApiBuilder().setToken(commandLineArguments[0]).login().join();
|
||||||
|
|
||||||
//Trivia management
|
//Trivia management
|
||||||
|
|
|
@ -11,6 +11,11 @@ public class QuizBackend {
|
||||||
private static final String dbPassword = Main.getCommandLineArgument(2);
|
private static final String dbPassword = Main.getCommandLineArgument(2);
|
||||||
private static final String dbName = "jdbc:mysql://localhost:3306/quizbot"; //we can make this configurable later
|
private static final String dbName = "jdbc:mysql://localhost:3306/quizbot"; //we can make this configurable later
|
||||||
|
|
||||||
|
// CREATE TABLE questions(id INT(32) AUTO_INCREMENT PRIMARY KEY, question TEXT, max_score INT(8));
|
||||||
|
// CREATE TABLE answer_coices(id INT(32), answer VARCHAR(2048), correctness BOOLEAN);
|
||||||
|
// CREATE TABLE user_answers(id INT(32), given_answer VARCHAR(2048), discord_user VARCHAR(1024));
|
||||||
|
// CREATE TABLE categories(id INT(32), category VARCHAR(1024));
|
||||||
|
|
||||||
private static Question[] allQuestions;
|
private static Question[] allQuestions;
|
||||||
private static String[] categories;
|
private static String[] categories;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue