diff options
| author | ilotterytea <iltsu@alright.party> | 2024-12-13 23:50:45 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2024-12-13 23:50:45 +0500 |
| commit | 2d40d39264de4eed0bdb9e8e0117a8c1e2f199d3 (patch) | |
| tree | 890df967067371cd5ddb7b83d733db875a253e7a /bot/src/main.cpp | |
| parent | ad05411350f1152cc3c86cebb5b8492d34507b33 (diff) | |
feat: now you can listen to github
Diffstat (limited to 'bot/src/main.cpp')
| -rw-r--r-- | bot/src/main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bot/src/main.cpp b/bot/src/main.cpp index 3c8f5e7..a95e4a8 100644 --- a/bot/src/main.cpp +++ b/bot/src/main.cpp @@ -1,12 +1,14 @@ #include <optional> #include <pqxx/pqxx> #include <string> +#include <thread> #include <vector> #include "api/twitch/helix_client.hpp" #include "bundle.hpp" #include "commands/command.hpp" #include "config.hpp" +#include "github.hpp" #include "handlers.hpp" #include "irc/client.hpp" #include "irc/message.hpp" @@ -99,6 +101,8 @@ int main(int argc, char *argv[]) { bot::stream::StreamListenerClient stream_listener_client(helix_client, client, cfg); + bot::GithubListener github_listener(cfg, client); + client.on<bot::irc::MessageType::Privmsg>( [&client, &command_loader, &localization, &cfg, &helix_client]( const bot::irc::Message<bot::irc::MessageType::Privmsg> &message) { @@ -118,6 +122,7 @@ int main(int argc, char *argv[]) { threads.push_back(std::thread(bot::create_timer_thread, &client, &cfg)); threads.push_back(std::thread(&bot::stream::StreamListenerClient::run, &stream_listener_client)); + threads.push_back(std::thread(&bot::GithubListener::run, &github_listener)); for (auto &thread : threads) { thread.join(); |
