From 2d40d39264de4eed0bdb9e8e0117a8c1e2f199d3 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Fri, 13 Dec 2024 23:50:45 +0500 Subject: feat: now you can listen to github --- bot/src/modules/event.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bot/src/modules/event.hpp') diff --git a/bot/src/modules/event.hpp b/bot/src/modules/event.hpp index 58695d9..f2d33b8 100644 --- a/bot/src/modules/event.hpp +++ b/bot/src/modules/event.hpp @@ -59,7 +59,7 @@ namespace bot { auto channels = bundle.helix_client.get_users({target}); api::twitch::schemas::User channel; - if (channels.empty() && type != schemas::EventType::CUSTOM) { + if (channels.empty() && type < schemas::EventType::GITHUB) { throw ResponseException( request, bundle.localization, t); } @@ -67,7 +67,7 @@ namespace bot { pqxx::work work(request.conn); std::string query; - if (type != schemas::CUSTOM) { + if (type < schemas::GITHUB) { channel = channels[0]; query = "SELECT id FROM events WHERE channel_id = " + @@ -97,7 +97,7 @@ namespace bot { std::string m = utils::string::str(s.begin(), s.end(), ' '); - if (type != schemas::CUSTOM) { + if (type < schemas::GITHUB) { query = "INSERT INTO events (channel_id, target_alias_id, " "event_type, " -- cgit v1.2.3