summaryrefslogtreecommitdiff
path: root/bot/src
diff options
context:
space:
mode:
Diffstat (limited to 'bot/src')
-rw-r--r--bot/src/commands/lua.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/bot/src/commands/lua.cpp b/bot/src/commands/lua.cpp
index a67bd17..b205f44 100644
--- a/bot/src/commands/lua.cpp
+++ b/bot/src/commands/lua.cpp
@@ -116,6 +116,10 @@ namespace bot::command::lua {
return utils::chrono::format_timestamp(timestamp);
});
+ state->set_function("time_humanize", [](const double &timestamp) {
+ return utils::chrono::format_timestamp(std::floor(timestamp));
+ });
+
state->set_function("time_format",
[](const long &timestamp, const std::string &format) {
std::time_t t = std::time(nullptr);