diff options
| author | ilotterytea <iltsu@alright.party> | 2024-04-21 16:03:34 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2024-04-21 16:03:34 +0500 |
| commit | a28e803f43bbf0f263df6ec4100bf0b1f1deb4bf (patch) | |
| tree | cd0ec0d876e7ae1c994cda342ff7cc0834ba7c71 /src/commands/command.cpp | |
| parent | d3cad81b14f41d1345d39c8bc0a1cb556bca4f09 (diff) | |
feat: instance bundle
Diffstat (limited to 'src/commands/command.cpp')
| -rw-r--r-- | src/commands/command.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/commands/command.cpp b/src/commands/command.cpp index b6852cc..9d6ec6a 100644 --- a/src/commands/command.cpp +++ b/src/commands/command.cpp @@ -4,6 +4,7 @@ #include <memory> #include <optional> +#include "../bundle.hpp" #include "../modules/ping.hpp" namespace bot { @@ -17,10 +18,12 @@ namespace bot { } std::optional<std::variant<std::vector<std::string>, std::string>> - CommandLoader::run(const irc::Message<irc::MessageType::Privmsg> &msg) { + CommandLoader::run( + const InstanceBundle &bundle, + const irc::Message<irc::MessageType::Privmsg> &msg) const { for (const std::unique_ptr<Command> &command : this->commands) { if (command->get_name() == msg.message) { - return command->run(msg); + return command->run(bundle, msg); } } |
