diff options
Diffstat (limited to 'src/commands/command.hpp')
| -rw-r--r-- | src/commands/command.hpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/commands/command.hpp b/src/commands/command.hpp index 0266301..5f69788 100644 --- a/src/commands/command.hpp +++ b/src/commands/command.hpp @@ -6,15 +6,17 @@ #include <variant> #include <vector> +#include "../bundle.hpp" #include "../irc/message.hpp" namespace bot { namespace command { class Command { public: - virtual std::string get_name() = 0; + virtual std::string get_name() const = 0; virtual std::variant<std::vector<std::string>, std::string> run( - const irc::Message<irc::MessageType::Privmsg> &msg) = 0; + const InstanceBundle &bundle, + const irc::Message<irc::MessageType::Privmsg> &msg) const = 0; }; class CommandLoader { @@ -24,7 +26,8 @@ namespace bot { void add_command(std::unique_ptr<Command> cmd); std::optional<std::variant<std::vector<std::string>, std::string>> run( - const irc::Message<irc::MessageType::Privmsg> &msg); + const InstanceBundle &bundle, + const irc::Message<irc::MessageType::Privmsg> &msg) const; const std::vector<std::unique_ptr<Command>> &get_commands() const { return this->commands; |
