diff options
Diffstat (limited to 'bot/src/schemas')
| -rw-r--r-- | bot/src/schemas/stream.cpp | 16 | ||||
| -rw-r--r-- | bot/src/schemas/stream.hpp | 1 |
2 files changed, 17 insertions, 0 deletions
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"; + } + } } diff --git a/bot/src/schemas/stream.hpp b/bot/src/schemas/stream.hpp index 0811561..9763ba9 100644 --- a/bot/src/schemas/stream.hpp +++ b/bot/src/schemas/stream.hpp @@ -5,6 +5,7 @@ namespace bot::schemas { enum EventType { LIVE, OFFLINE, TITLE, GAME, GITHUB = 10, CUSTOM = 99 }; EventType string_to_event_type(const std::string &type); + std::string event_type_to_string(const int &type); enum EventFlag { MASSPING }; |
