diff options
Diffstat (limited to 'bot/src/config.cpp')
| -rw-r--r-- | bot/src/config.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/bot/src/config.cpp b/bot/src/config.cpp index 010a0ec..714ff56 100644 --- a/bot/src/config.cpp +++ b/bot/src/config.cpp @@ -20,6 +20,11 @@ namespace bot { cmds["join_allowed"] = this->commands.join_allowed; cmds["join_allow_from_other_chats"] = this->commands.join_allow_from_other_chats; + if (this->commands.rpost_path.has_value()) { + cmds["rpost_path"] = this->commands.rpost_path.value(); + } else { + cmds["rpost_path"] = sol::nil; + } o["commands"] = cmds; // --- OWNER @@ -48,6 +53,11 @@ namespace bot { } else { url["paste_service"] = sol::nil; } + if (this->url.randompost.has_value()) { + url["randompost"] = this->url.randompost.value(); + } else { + url["randompost"] = sol::nil; + } o["url"] = url; return o; @@ -103,6 +113,8 @@ namespace bot { cmd_cfg.join_allowed = std::stoi(value); } else if (key == "commands.join_allow_from_other_chats") { cmd_cfg.join_allow_from_other_chats = std::stoi(value); + } else if (key == "commands.randompost.path") { + cmd_cfg.rpost_path = value; } else if (key == "owner.name") { @@ -115,6 +127,8 @@ namespace bot { url_cfg.help = value; } else if (key == "url.chatters.paste_service") { url_cfg.paste_service = value; + } else if (key == "url.randompost") { + url_cfg.randompost = value; } else if (key == "token.github") { |
