From 8a5c0ccec6a7d03525ba4e788c47f2c3c82b0238 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Sat, 12 Apr 2025 16:53:03 +0500 Subject: feat: bot_username() function --- bot/src/commands/lua.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'bot/src/commands/lua.cpp') diff --git a/bot/src/commands/lua.cpp b/bot/src/commands/lua.cpp index 571fdb5..96a9a68 100644 --- a/bot/src/commands/lua.cpp +++ b/bot/src/commands/lua.cpp @@ -76,6 +76,15 @@ namespace bot::command::lua { }); } + void add_bot_library(std::shared_ptr state, + const InstanceBundle &bundle) { + state->set_function("bot_username", [&bundle]() { + return bundle.irc_client.get_bot_username(); + }); + + add_bot_library(state); + } + void add_time_library(std::shared_ptr state) { state->set_function("time_current", []() { return static_cast( -- cgit v1.2.3