From 09be3c9959b109df652b3cbee7f0975aed4e3686 Mon Sep 17 00:00:00 2001 From: Louis Vallat Date: Fri, 16 Apr 2021 16:28:31 +0200 Subject: [PATCH] Fix: the reaction isn't added Signed-off-by: Louis Vallat --- .../java/xyz/vallat/louis/managers/discord/DiscordManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/xyz/vallat/louis/managers/discord/DiscordManager.java b/app/src/main/java/xyz/vallat/louis/managers/discord/DiscordManager.java index ecef565..dc282ec 100644 --- a/app/src/main/java/xyz/vallat/louis/managers/discord/DiscordManager.java +++ b/app/src/main/java/xyz/vallat/louis/managers/discord/DiscordManager.java @@ -68,7 +68,7 @@ public final class DiscordManager { .getReactors(r).any(user -> user.equals(discordClient.getSelf().block())).block()) && Objects.requireNonNull(event.getMessage().block()).getAuthor().isPresent() && !Objects.requireNonNull(event.getMessage().block()).getAuthor().get().equals(discordClient.getSelf().block())) - .flatMap(event -> event.getMessage().flatMap(message -> message.addReaction(reactionAnswers[new Random().nextInt(reactionAnswers.length)]))) + .flatMap(event -> event.getMessage().flatMap(message -> message.addReaction(reactionAnswers[new Random().nextInt(reactionAnswers.length)])).then()) .subscribe(); }