#include "../../languages/locale_en.hpp" #include "../../token.h" #include "../Commands.hpp" #include "SQL.hpp" #include #include #include #include #include int main(int argc, char **argv) { // SQL database set up sqlite3_open("discordServer.db", &database); // Fuck dude capitalism 😔😔😔 execSQL("CREATE TABLE IF NOT EXISTS MONEY(" "UID INT PRIMARY KEY NOT NULL," "Cash INT NOT NULL DEFAULT 0)"); // Bot setup bullshit dpp::cluster bot(TOKEN); // Neat utility bot.on_log(dpp::utility::cout_logger()); bot.on_slashcommand([](const dpp::slashcommand_t &event) { auto command = Commands.find(event.command.get_command_name()); if (command != Commands.end()) { command->second(event); return; } event.reply("Could not find that command :("); }); bot.on_ready([&bot](const dpp::ready_t &event) { if (dpp::run_once()) { bot.global_command_create( dpp::slashcommand("ping", "Ping-pong test", bot.me.id)); bot.guild_command_create( dpp::slashcommand("balance", COMMAND_BALANCE_DESCRIPTION, bot.me.id), GUILD); } if (dpp::run_once()) { // bot.global_command_delete(1395839332220408051); } }); // Remove dpp::st_wait if you want it to return execution // (so like async I assume?) bot.start(dpp::st_wait); }