Fix: the reaction isn't added
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
This commit is contained in:
parent
0375911c67
commit
09be3c9959
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user