code: public static CompletableFuture<MessageSet> getMessagesAroundWhile(
              TextChannel channel, Predicate<Message> condition, long around) {
          CompletableFuture<MessageSet> future = new CompletableFuture<>();
          channel.getApi().getThreadPool().getExecutorService().submit(() -> {
              try {
                  List<Message> messages = new ArrayList<>();
                  Optional<Message> untilMessage =
                          getMessagesAroundAsStream(channel, around)
                                  .peek(messages::add)
                                  .filter(condition.negate())
                                  .findFirst();
                  untilMessage.ifPresent(messages::remove);
  
                  future.complete(new MessageSetImpl(messages));
              } catch (Throwable t) {
                  future.completeExceptionally(t);
              }
          });
          return future;
      }
docs: Gets messages in the given channel around a given message in any channel while they meet the given condition.
  If the first message does not match the condition, an empty set is returned.
  The given message will be part of the result in addition to the messages around if it was sent in the given
  channel and is matched against the condition and will abort retrieval.
  Half of the messages will be older than the given message and half of the messages will be newer.
  If there aren't enough older or newer messages, the halves will not be same-sized.
  It's also not guaranteed to be perfectly balanced.
  
  @param channel The channel of the messages.
  @param condition The condition that has to be met.
  @param around Get messages around the message with this id.
  
  @return The messages.