From fbf41a4c737174442717ade79e895321ee8ada36 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Tue, 8 Apr 2025 01:06:11 +0400 Subject: upd: add twitch lib on every command run (that's maybe bad for performance) --- bot/src/commands/command.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bot/src/commands/command.cpp') diff --git a/bot/src/commands/command.cpp b/bot/src/commands/command.cpp index 1658554..87eecfd 100644 --- a/bot/src/commands/command.cpp +++ b/bot/src/commands/command.cpp @@ -84,7 +84,9 @@ namespace bot { } std::optional CommandLoader::run(const InstanceBundle &bundle, - const Request &request) const { + const Request &request) { + lua::library::add_twitch_library(this->luaState, request, bundle); + auto command = std::find_if( this->commands.begin(), this->commands.end(), [&](const auto &x) { return x->get_name() == request.command_id; }); -- cgit v1.2.3