From e410ed000d119d0d3e4d5707abad11512b9e4a34 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Tue, 15 Apr 2025 15:51:02 +0500 Subject: feat: !help in lua --- bot/src/commands/command.cpp | 2 -- bot/src/modules/help.hpp | 30 ------------------------------ 2 files changed, 32 deletions(-) delete mode 100644 bot/src/modules/help.hpp (limited to 'bot') 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()); this->add_command(std::make_unique()); this->add_command(std::make_unique()); - this->add_command(std::make_unique()); this->add_command(std::make_unique()); this->add_command(std::make_unique()); 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 -#include - -#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( - request, bundle.localization); - } - - return command::Response( - bundle.localization - .get_formatted_line(request, loc::LineId::HelpResponse, - {*bundle.configuration.url.help}) - .value()); - } - }; - } -} -- cgit v1.2.3