diff options
Diffstat (limited to 'bot/src/schemas/channel.hpp')
| -rw-r--r-- | bot/src/schemas/channel.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bot/src/schemas/channel.hpp b/bot/src/schemas/channel.hpp index 08ed8ad..d2f13eb 100644 --- a/bot/src/schemas/channel.hpp +++ b/bot/src/schemas/channel.hpp @@ -3,6 +3,7 @@ #include <chrono> #include <optional> #include <pqxx/pqxx> +#include <sol/sol.hpp> #include <string> #include <vector> @@ -40,6 +41,8 @@ namespace bot::schemas { return this->opted_out_at; } + sol::table as_lua_table(std::shared_ptr<sol::state> luaState) const; + private: int id, alias_id; std::string alias_name; @@ -50,6 +53,8 @@ namespace bot::schemas { enum ChannelFeature { MARKOV_RESPONSES, RANDOM_MARKOV_RESPONSES }; std::optional<ChannelFeature> string_to_channel_feature( const std::string &value); + std::optional<std::string> channelfeature_to_string( + const ChannelFeature &value); class ChannelPreferences { public: @@ -90,6 +95,8 @@ namespace bot::schemas { return this->features; } + sol::table as_lua_table(std::shared_ptr<sol::state> luaState) const; + private: int channel_id; std::string prefix, locale; |
