diff options
Diffstat (limited to 'bot/src')
| -rw-r--r-- | bot/src/commands/lua.cpp | 4 |
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 ×tamp) { + return utils::chrono::format_timestamp(std::floor(timestamp)); + }); + state->set_function("time_format", [](const long ×tamp, const std::string &format) { std::time_t t = std::time(nullptr); |
