diff options
Diffstat (limited to 'bot/src/commands/lua.cpp')
| -rw-r--r-- | bot/src/commands/lua.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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<sol::state> 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<sol::state> state) { state->set_function("time_current", []() { return static_cast<long long>( |
