summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-12-05 00:50:02 +0500
committerilotterytea <iltsu@alright.party>2025-12-05 00:50:02 +0500
commit55f4e1b6eb348534aac26a9380682a8c2be1901e (patch)
treedb1ce4f80f55320047da8dcb69a155460ace1efe
parentae485b94ea7b9d34efd4526ddf43ec51678e1be7 (diff)
upd: return empty response on nil
-rw-r--r--bot/src/commands/lua.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/bot/src/commands/lua.cpp b/bot/src/commands/lua.cpp
index c37f146..1a11378 100644
--- a/bot/src/commands/lua.cpp
+++ b/bot/src/commands/lua.cpp
@@ -942,6 +942,9 @@ namespace bot::command::lua {
}
}
return {o};
+ } else if (res.get_type() == sol::type::nil ||
+ res.get_type() == sol::type::lua_nil) {
+ return {};
} else {
// should it be ResponseException?
return {prefix + "Empty or unsupported response"};