Class VoiceServerUpdateEvent


  • public class VoiceServerUpdateEvent
    extends Event
    Dispatched when the current user is initially connecting to a voice channel, and when the current voice instance fails over to a new server (guild's voice server is updated).

    This event is dispatched by Discord.

    See Also:
    Voice Server Update
    • Method Detail

      • getToken

        public String getToken()
        Gets the voice connection token for the guild.
        Returns:
        The voice connection token.
      • getGuildId

        public Snowflake getGuildId()
        Gets the Snowflake ID of the guild whose voice server has been updated in this event.
        Returns:
        The ID of the guild involved.
      • getGuild

        public Mono<Guild> getGuild()
        Requests to retrieve the Guild whose voice server has been updated in this event.
        Returns:
        A Mono where, upon successful completion, emits the Guild whose voice server has been updated. If an error is received, it is emitted through the Mono.
      • getEndpoint

        @Nullable
        public String getEndpoint()
        Gets the voice server host's endpoint URL.
        Returns:
        The void server host's endpoint URL.