From 8c391504d160909753e6c6ee3186e0166b44c475 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Sun, 21 Apr 2024 17:20:38 +0500 Subject: feat: use Request instead of Message + util for creating requests --- src/commands/request.hpp | 42 +++++++----------------------------------- 1 file changed, 7 insertions(+), 35 deletions(-) (limited to 'src/commands/request.hpp') diff --git a/src/commands/request.hpp b/src/commands/request.hpp index 71f2f04..9742cbc 100644 --- a/src/commands/request.hpp +++ b/src/commands/request.hpp @@ -4,40 +4,12 @@ #include #include "../irc/message.hpp" -#include "command.hpp" - -namespace bot { - namespace command { - class Request { - public: - Request(const command::CommandLoader &command_loader, - const irc::Message &irc_message) - : irc_message(irc_message), command_loader(command_loader){}; - ~Request() = default; - - bool fill_request(); - - const std::string &get_command_id() const { return this->command_id; }; - const std::optional &get_subcommand_id() const { - return this->subcommand_id; - }; - const std::optional &get_message() const { - return this->message; - }; - - const irc::Message &get_irc_message() const { - return this->irc_message; - }; - - private: - std::string command_id; - std::optional subcommand_id; - std::optional message; - - const irc::Message &irc_message; - const command::CommandLoader &command_loader; - }; - - } +namespace bot::command { + struct Request { + std::string command_id; + std::optional subcommand_id; + std::optional message; + const irc::Message &irc_message; + }; } -- cgit v1.2.3