From 8f3e599e6d5df4284dafa1e032b94ce850dde00d Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Sun, 29 Oct 2023 22:30:28 +0100 Subject: [PATCH] Added the connection to main.cpp --- src/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 45f5646..3e8b2ad 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2,16 +2,21 @@ #include "listeners/ready.h" #include "listeners/slash.h" #include "api/config.h" +#include "api/util.h" +#include #define CONFIG_PATH "config.json" using json = nlohmann::json; using namespace dpp; +using namespace sql; int main(int argc, char **argv) { json configuration = config::read_config(argc < 2 ? CONFIG_PATH : argv[1]); + Connection *con = util::createConnection(configuration["database"]); + cluster bot(configuration["token"], dpp::i_default_intents | dpp::i_message_content); bot.on_slashcommand([&bot](const slashcommand_t &event) { slash::execute(bot, event); });