diff options
| author | ilotterytea <iltsu@alright.party> | 2025-04-15 15:51:02 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-04-15 15:51:02 +0500 |
| commit | e410ed000d119d0d3e4d5707abad11512b9e4a34 (patch) | |
| tree | 9c794a3fbc0ca615363948c4c92c183c462c6548 /bot/src | |
| parent | 2bd139d4323efa983df47bd131c90df501aee371 (diff) | |
feat: !help in lua
Diffstat (limited to 'bot/src')
| -rw-r--r-- | bot/src/commands/command.cpp | 2 | ||||
| -rw-r--r-- | bot/src/modules/help.hpp | 30 |
2 files changed, 0 insertions, 32 deletions
diff --git a/bot/src/commands/command.cpp b/bot/src/commands/command.cpp index 7364125..92ae45b 100644 --- a/bot/src/commands/command.cpp +++ b/bot/src/commands/command.cpp @@ -15,7 +15,6 @@ #include "../bundle.hpp" #include "../modules/custom_command.hpp" #include "../modules/event.hpp" -#include "../modules/help.hpp" #include "../modules/notify.hpp" #include "../modules/timer.hpp" #include "../utils/chrono.hpp" @@ -31,7 +30,6 @@ namespace bot { this->add_command(std::make_unique<mod::Notify>()); this->add_command(std::make_unique<mod::CustomCommand>()); this->add_command(std::make_unique<mod::Timer>()); - this->add_command(std::make_unique<mod::Help>()); this->add_command(std::make_unique<mod::LuaExecution>()); this->add_command(std::make_unique<mod::LuaRemoteExecution>()); diff --git a/bot/src/modules/help.hpp b/bot/src/modules/help.hpp deleted file mode 100644 index 1341b86..0000000 --- a/bot/src/modules/help.hpp +++ /dev/null @@ -1,30 +0,0 @@ -#pragma once - -#include <string> -#include <vector> - -#include "../bundle.hpp" -#include "../commands/command.hpp" -#include "../commands/response_error.hpp" - -namespace bot { - namespace mod { - class Help : public command::Command { - std::string get_name() const override { return "help"; } - - command::Response run(const InstanceBundle &bundle, - const command::Request &request) const override { - if (!bundle.configuration.url.help.has_value()) { - throw ResponseException<ResponseError::ILLEGAL_COMMAND>( - request, bundle.localization); - } - - return command::Response( - bundle.localization - .get_formatted_line(request, loc::LineId::HelpResponse, - {*bundle.configuration.url.help}) - .value()); - } - }; - } -} |
