summaryrefslogtreecommitdiff
path: root/bot/src/commands/command.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'bot/src/commands/command.hpp')
-rw-r--r--bot/src/commands/command.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/bot/src/commands/command.hpp b/bot/src/commands/command.hpp
index 40ec114..793446e 100644
--- a/bot/src/commands/command.hpp
+++ b/bot/src/commands/command.hpp
@@ -3,11 +3,11 @@
#include <memory>
#include <optional>
#include <string>
-#include <variant>
#include <vector>
#include "../bundle.hpp"
#include "request.hpp"
+#include "response.hpp"
namespace bot {
namespace command {
@@ -24,8 +24,8 @@ namespace bot {
class Command {
public:
virtual std::string get_name() const = 0;
- virtual std::variant<std::vector<std::string>, std::string> run(
- const InstanceBundle &bundle, const Request &request) const = 0;
+ virtual Response run(const InstanceBundle &bundle,
+ const Request &request) const = 0;
virtual schemas::PermissionLevel get_permission_level() const {
return schemas::PermissionLevel::USER;
}
@@ -41,8 +41,8 @@ namespace bot {
~CommandLoader() = default;
void add_command(std::unique_ptr<Command> cmd);
- std::optional<std::variant<std::vector<std::string>, std::string>> run(
- const InstanceBundle &bundle, const Request &msg) const;
+ std::optional<Response> run(const InstanceBundle &bundle,
+ const Request &msg) const;
const std::vector<std::unique_ptr<Command>> &get_commands() const {
return this->commands;