Added the connection to main.cpp
This commit is contained in:
parent
87d73e1dbb
commit
8f3e599e6d
@ -2,16 +2,21 @@
|
||||
#include "listeners/ready.h"
|
||||
#include "listeners/slash.h"
|
||||
#include "api/config.h"
|
||||
#include "api/util.h"
|
||||
#include <mariadb/conncpp.hpp>
|
||||
|
||||
#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); });
|
||||
|
Loading…
x
Reference in New Issue
Block a user