diff options
Diffstat (limited to 'bot/src/modules/help.hpp')
| -rw-r--r-- | bot/src/modules/help.hpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/bot/src/modules/help.hpp b/bot/src/modules/help.hpp index 13af228..1341b86 100644 --- a/bot/src/modules/help.hpp +++ b/bot/src/modules/help.hpp @@ -1,7 +1,6 @@ #pragma once #include <string> -#include <variant> #include <vector> #include "../bundle.hpp" @@ -13,18 +12,18 @@ namespace bot { class Help : public command::Command { std::string get_name() const override { return "help"; } - std::variant<std::vector<std::string>, std::string> run( - const InstanceBundle &bundle, - const command::Request &request) const override { + 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 bundle.localization - .get_formatted_line(request, loc::LineId::HelpResponse, - {*bundle.configuration.url.help}) - .value(); + return command::Response( + bundle.localization + .get_formatted_line(request, loc::LineId::HelpResponse, + {*bundle.configuration.url.help}) + .value()); } }; } |
