Check why StaticMessageChannel does not work?
All checks were successful
SteamWarCI Build successful

This commit is contained in:
2026-01-09 10:03:14 +01:00
parent ce3d50fcb7
commit 3cecc58bce

View File

@@ -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);
}