Package net.dv8tion.jda.api.hooks
Interface VoiceDispatchInterceptor
-
public interface VoiceDispatchInterceptorInterceptor 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 classVoiceDispatchInterceptor.VoiceServerUpdateWrapper for a Voice Server Updatestatic classVoiceDispatchInterceptor.VoiceStateUpdateWrapper for a Voice State Updatestatic interfaceVoiceDispatchInterceptor.VoiceUpdateAbstraction for all relevant voice updates
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonVoiceServerUpdate(VoiceDispatchInterceptor.VoiceServerUpdate update)Handles the VOICE_SERVER_UPDATE.booleanonVoiceStateUpdate(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.VoiceServerUpdateto 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.VoiceStateUpdateto handle- Returns:
- True, if a connection was previously established
-
-