summaryrefslogtreecommitdiff
path: root/bot/src/schemas/channel.cpp
blob: ae4ea536c4a7c89abad29683b10c52444896e93c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "channel.hpp"

namespace bot::schemas {
  std::optional<ChannelFeature> string_to_channel_feature(
      const std::string &value) {
    if (value == "markov_responses") {
      return MARKOV_RESPONSES;
    } else if (value == "random_markov_responses") {
      return RANDOM_MARKOV_RESPONSES;
    } else {
      return std::nullopt;
    }
  }
}