diff options
| author | ilotterytea <iltsu@alright.party> | 2025-04-18 16:05:36 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-04-18 16:05:36 +0500 |
| commit | e97e518a786b57372df4061e8fa878c9414640bd (patch) | |
| tree | 58c7d54143292b1bbed4997419afea41c4812649 /bot/src/schemas | |
| parent | ae030f0ba30b1cd4d10780d9fc2d7cad925b6976 (diff) | |
feat: 7TV emote support
Diffstat (limited to 'bot/src/schemas')
| -rw-r--r-- | bot/src/schemas/stream.cpp | 12 | ||||
| -rw-r--r-- | bot/src/schemas/stream.hpp | 13 |
2 files changed, 24 insertions, 1 deletions
diff --git a/bot/src/schemas/stream.cpp b/bot/src/schemas/stream.cpp index 7671de5..d4f769b 100644 --- a/bot/src/schemas/stream.cpp +++ b/bot/src/schemas/stream.cpp @@ -12,6 +12,12 @@ namespace bot::schemas { return EventType::GAME; } else if (type == "github") { return EventType::GITHUB; + } else if (type == "7tv_emote_add") { + return EventType::STV_EMOTE_CREATE; + } else if (type == "7tv_emote_delete") { + return EventType::STV_EMOTE_DELETE; + } else if (type == "7tv_emote_update") { + return EventType::STV_EMOTE_UPDATE; } else { return EventType::CUSTOM; } @@ -28,6 +34,12 @@ namespace bot::schemas { return "game"; } else if (type == GITHUB) { return "github"; + } else if (type == STV_EMOTE_CREATE) { + return "7tv_emote_add"; + } else if (type == STV_EMOTE_DELETE) { + return "7tv_emote_delete"; + } else if (type == STV_EMOTE_UPDATE) { + return "7tv_emote_update"; } else { return "custom"; } diff --git a/bot/src/schemas/stream.hpp b/bot/src/schemas/stream.hpp index acc6af1..357d476 100644 --- a/bot/src/schemas/stream.hpp +++ b/bot/src/schemas/stream.hpp @@ -4,7 +4,18 @@ #include <string> namespace bot::schemas { - enum EventType { LIVE, OFFLINE, TITLE, GAME, GITHUB = 10, CUSTOM = 99 }; + enum EventType { + LIVE, + OFFLINE, + TITLE, + GAME, + STV_EMOTE_CREATE = 10, + STV_EMOTE_DELETE = 11, + STV_EMOTE_UPDATE = 12, + GITHUB = 40, + CUSTOM = 99 + }; + EventType string_to_event_type(const std::string &type); std::string event_type_to_string(const int &type); |
