summaryrefslogtreecommitdiff
path: root/bot/src/schemas/channel.hpp
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-04-06 17:28:47 +0400
committerilotterytea <iltsu@alright.party>2025-04-06 17:28:47 +0400
commit2a49844a95593ac98e919c18651320e62f276fa7 (patch)
tree01b7e2ebb1dc7a9ac92e7c3105edfd098271f29a /bot/src/schemas/channel.hpp
parenta1a36cf4d4999b5ce89dce95364c9fd839b54b5d (diff)
feat: implementing lua coding
Diffstat (limited to 'bot/src/schemas/channel.hpp')
-rw-r--r--bot/src/schemas/channel.hpp7
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;