diff options
| author | ilotterytea <iltsu@alright.party> | 2024-04-21 17:20:38 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2024-04-21 17:20:38 +0500 |
| commit | 8c391504d160909753e6c6ee3186e0166b44c475 (patch) | |
| tree | 43a95cf37ef9075d32a41ae8b7d924df68d845e9 /src/commands/command.hpp | |
| parent | 6572077c73406cf6c353395aad13d493929a1596 (diff) | |
feat: use Request instead of Message + util for creating requests
Diffstat (limited to 'src/commands/command.hpp')
| -rw-r--r-- | src/commands/command.hpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/commands/command.hpp b/src/commands/command.hpp index 5f69788..498a1f2 100644 --- a/src/commands/command.hpp +++ b/src/commands/command.hpp @@ -7,7 +7,7 @@ #include <vector> #include "../bundle.hpp" -#include "../irc/message.hpp" +#include "request.hpp" namespace bot { namespace command { @@ -15,8 +15,7 @@ namespace bot { public: virtual std::string get_name() const = 0; virtual std::variant<std::vector<std::string>, std::string> run( - const InstanceBundle &bundle, - const irc::Message<irc::MessageType::Privmsg> &msg) const = 0; + const InstanceBundle &bundle, const Request &request) const = 0; }; class CommandLoader { @@ -26,8 +25,7 @@ namespace bot { void add_command(std::unique_ptr<Command> cmd); std::optional<std::variant<std::vector<std::string>, std::string>> run( - const InstanceBundle &bundle, - const irc::Message<irc::MessageType::Privmsg> &msg) const; + const InstanceBundle &bundle, const Request &msg) const; const std::vector<std::unique_ptr<Command>> &get_commands() const { return this->commands; |
