Package net.dv8tion.jda.api.hooks
Interface VoiceDispatchInterceptor
-
public interface VoiceDispatchInterceptor
Interceptor used to handle critical voice dispatches.
This will make it impossible to connect to voice channels with the built-inAudioManager
. It is expected that the user has some other means of establishing voice connections when this is used.- Since:
- 4.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
VoiceDispatchInterceptor.VoiceServerUpdate
Wrapper for a Voice Server Updatestatic class
VoiceDispatchInterceptor.VoiceStateUpdate
Wrapper for a Voice State Updatestatic interface
VoiceDispatchInterceptor.VoiceUpdate
Abstraction for all relevant voice updates
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onVoiceServerUpdate(VoiceDispatchInterceptor.VoiceServerUpdate update)
Handles the VOICE_SERVER_UPDATE.boolean
onVoiceStateUpdate(VoiceDispatchInterceptor.VoiceStateUpdate update)
Handles the VOICE_STATE_UPDATE.
-
-
-
Method Detail
-
onVoiceServerUpdate
void onVoiceServerUpdate(@Nonnull VoiceDispatchInterceptor.VoiceServerUpdate update)
Handles the VOICE_SERVER_UPDATE.- Parameters:
update
- TheVoiceDispatchInterceptor.VoiceServerUpdate
to handle
-
onVoiceStateUpdate
boolean onVoiceStateUpdate(@Nonnull VoiceDispatchInterceptor.VoiceStateUpdate update)
Handles the VOICE_STATE_UPDATE.
This indicates the user might have moved to a new voice channel.- Parameters:
update
- TheVoiceDispatchInterceptor.VoiceStateUpdate
to handle- Returns:
- True, if a connection was previously established
-
-