forked from SteamWar/SteamWar
Check why StaticMessageChannel does not work?
This commit is contained in:
+8
-1
@@ -63,7 +63,14 @@ public class StaticMessageChannel extends DiscordChannel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void init() {
|
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);
|
VelocityCore.schedule(this::update);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user