From d1f8efef4a68f81ca104e9b8f51e04497f3bd8aa Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Sun, 6 Apr 2025 18:25:46 +0400 Subject: feat: !ping in lua + bot and time libraries --- bot/src/commands/command.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'bot/src/commands/command.cpp') diff --git a/bot/src/commands/command.cpp b/bot/src/commands/command.cpp index 97dd88b..baf5a62 100644 --- a/bot/src/commands/command.cpp +++ b/bot/src/commands/command.cpp @@ -21,7 +21,6 @@ #include "../modules/massping.hpp" #include "../modules/mcsrv.hpp" #include "../modules/notify.hpp" -#include "../modules/ping.hpp" #include "../modules/settings.hpp" #include "../modules/spam.hpp" #include "../modules/timer.hpp" @@ -35,7 +34,6 @@ namespace bot { namespace command { CommandLoader::CommandLoader() { - this->add_command(std::make_unique()); this->add_command(std::make_unique()); this->add_command(std::make_unique()); this->add_command(std::make_unique()); @@ -50,7 +48,11 @@ namespace bot { this->add_command(std::make_unique()); this->luaState = std::make_shared(); - this->luaState->open_libraries(sol::lib::base, sol::lib::string); + this->luaState->open_libraries(sol::lib::base, sol::lib::string, + sol::lib::math); + + lua::library::add_bot_library(this->luaState); + lua::library::add_time_library(this->luaState); } void CommandLoader::load_lua_directory(const std::string &folder_path) { -- cgit v1.2.3