summaryrefslogtreecommitdiff
path: root/bot/src/modules/event.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'bot/src/modules/event.hpp')
-rw-r--r--bot/src/modules/event.hpp6
1 files changed, 3 insertions, 3 deletions
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<ResponseError::NOT_FOUND>(
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, "