Squash bugs and warnings, optimise CMake builds.
This commit is contained in:
@ -62,6 +62,5 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
Logger::write("Cleaned up", Logger::LogLevel::Info);
|
||||
|
||||
std::getchar();
|
||||
return exit_code;
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "Logger.hpp"
|
||||
#include "BotConfig.hpp"
|
||||
|
||||
TriviaGame::TriviaGame(BotConfig &c, GatewayHandler *gh, std::string channel_id, int total_questions, int delay) : interval(delay), config(c) {
|
||||
TriviaGame::TriviaGame(BotConfig &c, GatewayHandler *gh, std::string channel_id, int total_questions, int delay) : config(c), interval(delay) {
|
||||
this->gh = gh;
|
||||
this->channel_id = channel_id;
|
||||
|
||||
@ -339,4 +339,4 @@ void TriviaGame::update_average_time(std::string user_id, int time) {
|
||||
// yeah it probably loses accuracy here, doesn't really matter
|
||||
average_times[user_id] = (int) (total / questions_answered);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ namespace CommandHelper {
|
||||
sqlite3 *db; int return_code;
|
||||
return_code = sqlite3_open("bot/db/trivia.db", &db);
|
||||
|
||||
std::string sql = "SELECT * FROM CustomJS";
|
||||
std::string sql = "SELECT GuildID, CommandName, Script FROM CustomJS";
|
||||
|
||||
sqlite3_stmt *stmt;
|
||||
return_code = sqlite3_prepare_v2(db, sql.c_str(), -1, &stmt, 0);
|
||||
@ -161,4 +161,4 @@ namespace CommandHelper {
|
||||
|
||||
return exists;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user