summaryrefslogtreecommitdiff
path: root/bot
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-04-15 04:31:52 +0500
committerilotterytea <iltsu@alright.party>2025-04-15 04:31:52 +0500
commit22d9eb220376ccf2bddeb3b3895064804c534ac8 (patch)
tree10594952e67444f5a80a26f90e6ff518ba5ffe94 /bot
parentaad647cdb74c5773dd2ce45d063843e387d6b67c (diff)
fix: sol nil type
Diffstat (limited to 'bot')
-rw-r--r--bot/src/commands/lua.cpp4
-rw-r--r--bot/src/config.cpp14
2 files changed, 9 insertions, 9 deletions
diff --git a/bot/src/commands/lua.cpp b/bot/src/commands/lua.cpp
index a3ec57f..d02b9db 100644
--- a/bot/src/commands/lua.cpp
+++ b/bot/src/commands/lua.cpp
@@ -70,7 +70,7 @@ namespace bot::command::lua {
bot::parse_configuration_from_file(".env");
if (!o_cfg.has_value()) {
- return sol::make_object(*state, sol::nil);
+ return sol::make_object(*state, sol::lua_nil);
}
return sol::make_object(*state, o_cfg->as_lua_table(state));
@@ -447,7 +447,7 @@ namespace bot::command::lua {
sol::object obj;
if (v.is_null()) {
- obj = sol::make_object(*state, sol::nil);
+ obj = sol::make_object(*state, sol::lua_nil);
} else {
obj = sol::make_object(*state, v.as<std::string>());
}
diff --git a/bot/src/config.cpp b/bot/src/config.cpp
index cfd900f..4fc3994 100644
--- a/bot/src/config.cpp
+++ b/bot/src/config.cpp
@@ -23,12 +23,12 @@ namespace bot {
if (this->commands.rpost_path.has_value()) {
cmds["rpost_path"] = this->commands.rpost_path.value();
} else {
- cmds["rpost_path"] = sol::nil;
+ cmds["rpost_path"] = sol::lua_nil;
}
if (this->commands.paste_path.has_value()) {
cmds["paste_path"] = this->commands.paste_path.value();
} else {
- cmds["paste_path"] = sol::nil;
+ cmds["paste_path"] = sol::lua_nil;
}
cmds["paste_body_name"] = this->commands.paste_body_name;
cmds["paste_title_name"] = this->commands.paste_title_name;
@@ -39,12 +39,12 @@ namespace bot {
if (this->owner.name.has_value()) {
owner["name"] = this->owner.name.value();
} else {
- owner["name"] = sol::nil;
+ owner["name"] = sol::lua_nil;
}
if (this->owner.id.has_value()) {
owner["id"] = this->owner.id.value();
} else {
- owner["id"] = sol::nil;
+ owner["id"] = sol::lua_nil;
}
o["owner"] = owner;
@@ -53,17 +53,17 @@ namespace bot {
if (this->url.help.has_value()) {
url["help"] = this->url.help.value();
} else {
- url["help"] = sol::nil;
+ url["help"] = sol::lua_nil;
}
if (this->url.paste_service.has_value()) {
url["paste_service"] = this->url.paste_service.value();
} else {
- url["paste_service"] = sol::nil;
+ url["paste_service"] = sol::lua_nil;
}
if (this->url.randompost.has_value()) {
url["randompost"] = this->url.randompost.value();
} else {
- url["randompost"] = sol::nil;
+ url["randompost"] = sol::lua_nil;
}
o["url"] = url;