summaryrefslogtreecommitdiff
path: root/src/commands/request.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/request.hpp')
-rw-r--r--src/commands/request.hpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/commands/request.hpp b/src/commands/request.hpp
new file mode 100644
index 0000000..71f2f04
--- /dev/null
+++ b/src/commands/request.hpp
@@ -0,0 +1,43 @@
+#pragma once
+
+#include <optional>
+#include <string>
+
+#include "../irc/message.hpp"
+#include "command.hpp"
+
+namespace bot {
+ namespace command {
+ class Request {
+ public:
+ Request(const command::CommandLoader &command_loader,
+ const irc::Message<irc::MessageType::Privmsg> &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<std::string> &get_subcommand_id() const {
+ return this->subcommand_id;
+ };
+ const std::optional<std::string> &get_message() const {
+ return this->message;
+ };
+
+ const irc::Message<irc::MessageType::Privmsg> &get_irc_message() const {
+ return this->irc_message;
+ };
+
+ private:
+ std::string command_id;
+ std::optional<std::string> subcommand_id;
+ std::optional<std::string> message;
+
+ const irc::Message<irc::MessageType::Privmsg> &irc_message;
+ const command::CommandLoader &command_loader;
+ };
+
+ }
+
+}