From 52fd4ea8bad5cd7d3940a41df4f8f54b4e72beae Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Sat, 7 Dec 2024 17:24:25 +0500 Subject: feat: a special class for command responses --- bot/src/commands/response.hpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 bot/src/commands/response.hpp (limited to 'bot/src/commands/response.hpp') diff --git a/bot/src/commands/response.hpp b/bot/src/commands/response.hpp new file mode 100644 index 0000000..2f05fd8 --- /dev/null +++ b/bot/src/commands/response.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include +#include +#include + +namespace bot::command { + class Response { + public: + Response(); + Response(std::string single); + Response(std::vector multiple); + + const std::string get_single() const; + const std::vector get_multiple() const; + + const bool is_single() const; + const bool is_multiple() const; + const bool is_empty() const; + + private: + std::optional single; + std::optional> multiple; + }; +} \ No newline at end of file -- cgit v1.2.3