From 2a49844a95593ac98e919c18651320e62f276fa7 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Sun, 6 Apr 2025 17:28:47 +0400 Subject: feat: implementing lua coding --- bot/src/schemas/channel.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bot/src/schemas/channel.hpp') 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 #include #include +#include #include #include @@ -40,6 +41,8 @@ namespace bot::schemas { return this->opted_out_at; } + sol::table as_lua_table(std::shared_ptr 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 string_to_channel_feature( const std::string &value); + std::optional 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 luaState) const; + private: int channel_id; std::string prefix, locale; -- cgit v1.2.3