From a28e803f43bbf0f263df6ec4100bf0b1f1deb4bf Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Sun, 21 Apr 2024 16:03:34 +0500 Subject: feat: instance bundle --- src/commands/command.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/commands/command.hpp') 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 #include +#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::string> run( - const irc::Message &msg) = 0; + const InstanceBundle &bundle, + const irc::Message &msg) const = 0; }; class CommandLoader { @@ -24,7 +26,8 @@ namespace bot { void add_command(std::unique_ptr cmd); std::optional, std::string>> run( - const irc::Message &msg); + const InstanceBundle &bundle, + const irc::Message &msg) const; const std::vector> &get_commands() const { return this->commands; -- cgit v1.2.3