Compare commits
	
		
			No commits in common. "a97424041cfa859e94fb41ba1f531e61d4ef0964" and "aa0bcd3e99fafc8402787e48c0b12df8f131e967" have entirely different histories. 
		
	
	
		
			a97424041c
			...
			aa0bcd3e99
		
	
		|  | @ -16,13 +16,15 @@ public class Main { | |||
| 		// [0] token, [1] db username, [2] db password
 | ||||
| 		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
 | ||||
| 		CheckDeploy check = new CheckDeploy(7500, "/var/www/deployment/Hacky-Quizbot/id.txt"); | ||||
| 		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(); | ||||
| 		 | ||||
| 		//Trivia management
 | ||||
|  |  | |||
|  | @ -11,11 +11,6 @@ public class QuizBackend { | |||
| 	private static final String dbPassword = Main.getCommandLineArgument(2); | ||||
| 	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 String[] categories; | ||||
| 	 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue