summaryrefslogtreecommitdiff
path: root/bot/src/modules/chatters.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'bot/src/modules/chatters.hpp')
-rw-r--r--bot/src/modules/chatters.hpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/bot/src/modules/chatters.hpp b/bot/src/modules/chatters.hpp
index fe921ab..6e4c61c 100644
--- a/bot/src/modules/chatters.hpp
+++ b/bot/src/modules/chatters.hpp
@@ -4,7 +4,6 @@
#include <iomanip>
#include <sstream>
#include <string>
-#include <variant>
#include <vector>
#include "../bundle.hpp"
@@ -25,9 +24,8 @@ namespace bot::mod {
int get_delay_seconds() const override { return 10; }
- std::variant<std::vector<std::string>, std::string> run(
- const InstanceBundle &bundle,
- const command::Request &request) const override {
+ command::Response run(const InstanceBundle &bundle,
+ const command::Request &request) const override {
if (!bundle.configuration.url.paste_service.has_value()) {
throw ResponseException<ResponseError::ILLEGAL_COMMAND>(
request, bundle.localization);
@@ -65,9 +63,11 @@ namespace bot::mod {
std::string url = *bundle.configuration.url.paste_service + "/" + id;
- return bundle.localization
- .get_formatted_line(request, loc::LineId::ChattersResponse, {url})
- .value();
+ return command::Response(
+ bundle.localization
+ .get_formatted_line(request, loc::LineId::ChattersResponse,
+ {url})
+ .value());
} else {
throw ResponseException<ResponseError::EXTERNAL_API_ERROR>(
request, bundle.localization, response.status_code,