From 5ca6a1c1ccfff28ff28f992a6d2231c49f7cabf9 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Wed, 16 Apr 2025 20:49:33 +0500 Subject: feat: more string functions --- bot/src/schemas/stream.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'bot/src/schemas/stream.cpp') diff --git a/bot/src/schemas/stream.cpp b/bot/src/schemas/stream.cpp index 34d170a..dbd5929 100644 --- a/bot/src/schemas/stream.cpp +++ b/bot/src/schemas/stream.cpp @@ -16,4 +16,20 @@ namespace bot::schemas { return EventType::CUSTOM; } } + + std::string event_type_to_string(const int &type) { + if (type == LIVE) { + return "live"; + } else if (type == OFFLINE) { + return "offline"; + } else if (type == TITLE) { + return "title"; + } else if (type == GAME) { + return "game"; + } else if (type == GITHUB) { + return "github"; + } else { + return "custom"; + } + } } -- cgit v1.2.3