From 1924b6751a29f8b528d09412bd1e1e74f4d30c27 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Fri, 3 May 2024 23:26:52 +0500 Subject: feat: stream listener client --- src/stream.hpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/stream.hpp (limited to 'src/stream.hpp') diff --git a/src/stream.hpp b/src/stream.hpp new file mode 100644 index 0000000..ba71a6a --- /dev/null +++ b/src/stream.hpp @@ -0,0 +1,30 @@ +#pragma once + +#include +#include + +#include "api/twitch/helix_client.hpp" + +namespace bot::stream { + class StreamListenerClient { + public: + StreamListenerClient(const api::twitch::HelixClient &helix_client) + : helix_client(helix_client){}; + ~StreamListenerClient() = default; + + void run_thread(); + + void listen_channel(const int &id); + void unlisten_channel(const int &id); + + private: + void run(); + void check(); + + const api::twitch::HelixClient &helix_client; + + std::vector ids; + + std::set online_ids; + }; +} -- cgit v1.2.3