diff options
| author | ilotterytea <iltsu@alright.party> | 2025-04-06 17:28:47 +0400 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-04-06 17:28:47 +0400 |
| commit | 2a49844a95593ac98e919c18651320e62f276fa7 (patch) | |
| tree | 01b7e2ebb1dc7a9ac92e7c3105edfd098271f29a /bot/src/commands/command.hpp | |
| parent | a1a36cf4d4999b5ce89dce95364c9fd839b54b5d (diff) | |
feat: implementing lua coding
Diffstat (limited to 'bot/src/commands/command.hpp')
| -rw-r--r-- | bot/src/commands/command.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bot/src/commands/command.hpp b/bot/src/commands/command.hpp index 793446e..c2398ec 100644 --- a/bot/src/commands/command.hpp +++ b/bot/src/commands/command.hpp @@ -2,6 +2,8 @@ #include <memory> #include <optional> +#include <sol/sol.hpp> +#include <sol/state.hpp> #include <string> #include <vector> @@ -41,6 +43,7 @@ namespace bot { ~CommandLoader() = default; void add_command(std::unique_ptr<Command> cmd); + void load_lua_directory(const std::string &folder_path); std::optional<Response> run(const InstanceBundle &bundle, const Request &msg) const; @@ -50,6 +53,8 @@ namespace bot { private: std::vector<std::unique_ptr<Command>> commands; + + std::shared_ptr<sol::state> luaState; }; } } |
