From d1793df1eda463b10107d41785ad1d7f055ed476 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Sat, 18 May 2024 14:48:12 +0500 Subject: upd: moved the bot part to a relative subfolder --- bot/src/schemas/stream.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 bot/src/schemas/stream.cpp (limited to 'bot/src/schemas/stream.cpp') diff --git a/bot/src/schemas/stream.cpp b/bot/src/schemas/stream.cpp new file mode 100644 index 0000000..6ef10dc --- /dev/null +++ b/bot/src/schemas/stream.cpp @@ -0,0 +1,17 @@ +#include "stream.hpp" + +namespace bot::schemas { + EventType string_to_event_type(const std::string &type) { + if (type == "live") { + return EventType::LIVE; + } else if (type == "offline") { + return EventType::OFFLINE; + } else if (type == "title") { + return EventType::TITLE; + } else if (type == "game") { + return EventType::GAME; + } else { + return EventType::CUSTOM; + } + } +} -- cgit v1.2.3