/** * Sets the provider that decides for all shards whether they should be marked as afk or not. * * <p>This will also change the provider for shards that are created in the future. * * @param idleProvider * boolean */ default void setIdleProvider(final IntFunction<Boolean> idleProvider) { this.getShardCache().forEach(jda -> jda.getPresence().setIdle(idleProvider.apply(jda.getShardInfo().getShardId()))); }