All Downloads are FREE. Search and download functionalities are using the official Maven repository.

discord4j.voice.VoiceConnection Maven / Gradle / Ivy

There is a newer version: 3.3.0-RC1
Show newest version
package discord4j.voice;

/**
 * Allows for manipulation of an already-established voice connection.
 */
public class VoiceConnection {

    private final VoiceGatewayClient vgw;
    private final Runnable leaveChannel;

    VoiceConnection(VoiceGatewayClient vgw, Runnable leaveChannel) {
        this.vgw = vgw;
        this.leaveChannel = leaveChannel;
    }

    public void disconnect() {
        vgw.stop();
        leaveChannel.run();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy