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/modules | |
| parent | 2bd139d4323efa983df47bd131c90df501aee371 (diff) | |
feat: !help in lua
Diffstat (limited to 'bot/src/modules')
| -rw-r--r-- | bot/src/modules/help.hpp | 30 |
1 files changed, 0 insertions, 30 deletions
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()); - } - }; - } -} |
