Class VoiceStateUpdateEvent


  • public class VoiceStateUpdateEvent
    extends Event
    Dispatched when a user's voice state changes.

    This change can include the change of any property in VoiceState.

    The old voice state may not be present if voice states are not stored.

    This event is dispatched by Discord.

    See Also:
    Voice State Update
    • Method Detail

      • getOld

        public Optional<VoiceState> getOld()
        Gets the old VoiceState that has been updated in this event, if present. This may not be available if VoiceStates are not stored.
        Returns:
        The old VoiceState, if present.
      • isJoinEvent

        public boolean isJoinEvent()
        Gets whether this event is a voice channel join event.
        Returns:
        true if this is a voice channel join event, false otherwise.
      • isLeaveEvent

        public boolean isLeaveEvent()
        Gets whether this event is a voice channel leave event.
        Returns:
        true if this is a voice channel leave event, false otherwise.
      • isMoveEvent

        public boolean isMoveEvent()
        Gets whether this event is a voice channel move event.
        Returns:
        {code true} if this is a voice channel move event, false otherwise.