Interface VoiceServerUpdateTask

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface VoiceServerUpdateTask
A listener to track voice server changes due to migrations or disconnections. A voice client can then react to external changes coming from the gateway.
  • Method Details

    • onVoiceServerUpdate

      @Deprecated Mono<VoiceServerOptions> onVoiceServerUpdate(Snowflake guildId)
      Deprecated.
      for removal in future versions, migrate to onVoiceServerUpdates(Snowflake) as voice clients can receive multiple voice server updates throughout their lifecycle
      Return a Mono sequence containing an eventual VoiceServerOptions instance indicating a voice server update payload was received from the gateway connection for the given guild.
      Parameters:
      guildId - the guild ID listening for voice server updates
      Returns:
      a Mono with a VoiceServerOptions payload
    • onVoiceServerUpdates

      default Flux<VoiceServerOptions> onVoiceServerUpdates(Snowflake guildId)
      Return a Flux sequence containing VoiceServerOptions instances indicating a voice server update payload was received from the gateway connection for the given guild.
      Parameters:
      guildId - the guild ID listening for voice server updates
      Returns:
      a Flux with a VoiceServerOptions payload