Integrated the global listener to the main.cpp
This commit is contained in:
parent
86e980267b
commit
9526336719
@ -1,6 +1,7 @@
|
||||
#include <dpp/dpp.h>
|
||||
#include "listeners/ready.h"
|
||||
#include "listeners/slash.h"
|
||||
#include "listeners/global.h"
|
||||
#include "api/config.h"
|
||||
#include "api/util.h"
|
||||
#include <mariadb/conncpp.hpp>
|
||||
@ -19,7 +20,9 @@ int main(int argc, char **argv) {
|
||||
|
||||
cluster bot(configuration["token"], dpp::i_default_intents | dpp::i_message_content);
|
||||
|
||||
bot.on_slashcommand([&bot](const slashcommand_t &event) { slash::execute(bot, event); });
|
||||
bot.on_slashcommand([&bot, &con](const slashcommand_t &event) { slash::execute(*con, bot, event); });
|
||||
|
||||
bot.on_message_create([&bot, &con](const message_create_t &event) { global::execute(*con, bot, event); });
|
||||
|
||||
bot.on_ready([&bot](const ready_t &event) { ready::execute(bot, event); });
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user