Class DirectAudioControllerImpl
java.lang.Object
net.dv8tion.jda.internal.managers.DirectAudioControllerImpl
- All Implemented Interfaces:
DirectAudioController
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
connect
(AudioChannel channel) Requests a voice server endpoint for connecting to the voice gateway.void
disconnect
(Guild guild) Requests to terminate the connection to a voice channel.getJDA()
The associated JDA instancevoid
reconnect
(AudioChannel channel) Requests to reconnect to the voice channel in the target guild.void
update
(Guild guild, AudioChannel channel) Used to update the internal state of the voice request.
-
Constructor Details
-
DirectAudioControllerImpl
-
-
Method Details
-
getJDA
Description copied from interface:DirectAudioController
The associated JDA instance- Specified by:
getJDA
in interfaceDirectAudioController
- Returns:
- The JDA instance
-
connect
Description copied from interface:DirectAudioController
Requests a voice server endpoint for connecting to the voice gateway.- Specified by:
connect
in interfaceDirectAudioController
- Parameters:
channel
- The channel to connect to- See Also:
-
disconnect
Description copied from interface:DirectAudioController
Requests to terminate the connection to a voice channel.- Specified by:
disconnect
in interfaceDirectAudioController
- Parameters:
guild
- The guild we were connected to- See Also:
-
reconnect
Description copied from interface:DirectAudioController
Requests to reconnect to the voice channel in the target guild.- Specified by:
reconnect
in interfaceDirectAudioController
- Parameters:
channel
- The channel we were connected to
-
update
Used to update the internal state of the voice request. When a connection was successfully established JDA will stop sending requests for the initial connect.
This is done to retry the voice updates in case of a partial service failure.Should be called when:
- Receiving a Voice State Update for the current account and we were previously connected (moved or disconnected)
- Receiving a Voice Server Update (initial connect or region change)
The internal dispatch handlers already call this when needed, a library end-user never needs to call this method.- Parameters:
guild
- The guild to update the state forchannel
- The new channel, or null to signal disconnect
-