From 9526336719f8d5b072c9abaf4b0d9a36d7474f28 Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Sat, 4 Nov 2023 12:23:41 +0100 Subject: [PATCH] Integrated the global listener to the main.cpp --- src/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 3e8b2ad..7442f7d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,6 +1,7 @@ #include #include "listeners/ready.h" #include "listeners/slash.h" +#include "listeners/global.h" #include "api/config.h" #include "api/util.h" #include @@ -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); });