diff options
| author | ilotterytea <iltsu@alright.party> | 2025-04-12 16:53:03 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-04-12 16:53:03 +0500 |
| commit | 8a5c0ccec6a7d03525ba4e788c47f2c3c82b0238 (patch) | |
| tree | 5384f60bb9bd68d792a403fa321c65df26038628 /bot/src/commands/lua.cpp | |
| parent | 32506ce7fcc9990961779b1b00a32a31fa985b45 (diff) | |
feat: bot_username() function
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>( |
