From 3cecc58bced3c1c534be31167aa504c371e39612 Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Fri, 9 Jan 2026 10:03:14 +0100 Subject: [PATCH] Check why StaticMessageChannel does not work? --- .../discord/channels/StaticMessageChannel.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/VelocityCore/src/de/steamwar/velocitycore/discord/channels/StaticMessageChannel.java b/VelocityCore/src/de/steamwar/velocitycore/discord/channels/StaticMessageChannel.java index 9de9c5b5..359ff4ce 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/discord/channels/StaticMessageChannel.java +++ b/VelocityCore/src/de/steamwar/velocitycore/discord/channels/StaticMessageChannel.java @@ -63,7 +63,14 @@ public class StaticMessageChannel extends DiscordChannel { } private void init() { - message = getChannel().getIterableHistory().onErrorMap(throwable -> Collections.emptyList()).complete().stream().filter(m -> m.getAuthor().isBot()).findFirst().orElse(null); + message = getChannel().getIterableHistory() + .onErrorMap(throwable -> Collections.emptyList()) + .deadline(System.currentTimeMillis() + 5000) + .complete() + .stream() + .filter(m -> m.getAuthor().isBot()) + .findFirst() + .orElse(null); VelocityCore.schedule(this::update); }