diff options
| author | ilotterytea <iltsu@alright.party> | 2025-07-02 03:32:50 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-07-02 03:32:50 +0500 |
| commit | 94fede466d8d77f53e5c49215fc8ad99a30610f9 (patch) | |
| tree | 94586a05474481faa9fbb0bb99f0cc90f9004fe7 /bot | |
| parent | 79be89ad0491bfdd110b2c612e21a0f28c29fa87 (diff) | |
feat: silent mode in features
Diffstat (limited to 'bot')
| -rw-r--r-- | bot/src/schemas/channel.cpp | 4 | ||||
| -rw-r--r-- | bot/src/schemas/channel.hpp | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/bot/src/schemas/channel.cpp b/bot/src/schemas/channel.cpp index 540b7c0..ee0597b 100644 --- a/bot/src/schemas/channel.cpp +++ b/bot/src/schemas/channel.cpp @@ -9,6 +9,8 @@ namespace bot::schemas { return MARKOV_RESPONSES; } else if (value == "random_markov_responses") { return RANDOM_MARKOV_RESPONSES; + } else if (value == "silent_mode") { + return SILENT_MODE; } else { return std::nullopt; } @@ -21,6 +23,8 @@ namespace bot::schemas { return "markov_responses"; case RANDOM_MARKOV_RESPONSES: return "random_markov_responses"; + case SILENT_MODE: + return "silent_mode"; default: std::nullopt; } diff --git a/bot/src/schemas/channel.hpp b/bot/src/schemas/channel.hpp index a8979ec..c2ac5e2 100644 --- a/bot/src/schemas/channel.hpp +++ b/bot/src/schemas/channel.hpp @@ -50,9 +50,13 @@ namespace bot::schemas { std::optional<std::chrono::system_clock::time_point> opted_out_at; }; - enum ChannelFeature { MARKOV_RESPONSES, RANDOM_MARKOV_RESPONSES }; - const std::vector<ChannelFeature> FEATURES = {MARKOV_RESPONSES, - RANDOM_MARKOV_RESPONSES}; + enum ChannelFeature { + MARKOV_RESPONSES, + RANDOM_MARKOV_RESPONSES, + SILENT_MODE + }; + const std::vector<ChannelFeature> FEATURES = { + MARKOV_RESPONSES, RANDOM_MARKOV_RESPONSES, SILENT_MODE}; std::optional<ChannelFeature> string_to_channel_feature( const std::string &value); std::optional<std::string> channelfeature_to_string( |
