From 35b546c4d5f39ba5100f385ae29d257f5b40e691 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Sat, 4 May 2024 20:11:06 +0500 Subject: upd: StreamListenerClient requires now IRC client and Configuration --- src/main.cpp | 3 ++- src/stream.hpp | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index 20823ba..3fbf024 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -62,7 +62,8 @@ int main(int argc, char *argv[]) { bot::api::twitch::HelixClient helix_client(cfg.bot_password, cfg.bot_client_id); - bot::stream::StreamListenerClient stream_listener_client(helix_client); + bot::stream::StreamListenerClient stream_listener_client(helix_client, client, + cfg); client.on( [&client, &command_loader, &localization, &cfg, &helix_client]( diff --git a/src/stream.hpp b/src/stream.hpp index ba71a6a..687fc1e 100644 --- a/src/stream.hpp +++ b/src/stream.hpp @@ -4,12 +4,20 @@ #include #include "api/twitch/helix_client.hpp" +#include "api/twitch/schemas/stream.hpp" +#include "config.hpp" +#include "irc/client.hpp" +#include "schemas/stream.hpp" namespace bot::stream { class StreamListenerClient { public: - StreamListenerClient(const api::twitch::HelixClient &helix_client) - : helix_client(helix_client){}; + StreamListenerClient(const api::twitch::HelixClient &helix_client, + irc::Client &irc_client, + const Configuration &configuration) + : helix_client(helix_client), + irc_client(irc_client), + configuration(configuration){}; ~StreamListenerClient() = default; void run_thread(); @@ -22,6 +30,8 @@ namespace bot::stream { void check(); const api::twitch::HelixClient &helix_client; + irc::Client &irc_client; + const Configuration &configuration; std::vector ids; -- cgit v1.2.3