Interface DAVEProvider
public interface DAVEProvider
Interface for DAVE (Discord Audio/Voice Encryption) protocol implementation.
IMPORTANT: Starting March 1st, 2026, Discord requires all voice connections to use End-to-End Encryption (E2EE) via the DAVE protocol. Plugins that want to use voice functionality MUST provide a DAVE implementation.
Available implementations include:
- JDAVE - Requires Java 25+
- libdave-jvm - Requires Java 8+
Plugin developers are responsible for choosing and bundling their DAVE implementation.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classException thrown when DAVE operations fail. -
Method Summary
Modifier and TypeMethodDescriptiongetName()Get the name of this DAVE implementation.Get the native library instance for JDA's VoiceEncryption interface.intGet the minimum Java version required by this implementation.Get the version of this DAVE implementation.voidInitialize the DAVE implementation.booleanCheck if this DAVE implementation is available and properly initialized.voidshutdown()Clean up resources when the voice connection is closed.
-
Method Details
-
getName
String getName()Get the name of this DAVE implementation.- Returns:
- the implementation name (e.g., "JDAVE", "libdave-jvm")
-
getVersion
-
isAvailable
boolean isAvailable()Check if this DAVE implementation is available and properly initialized.- Returns:
- true if the implementation is ready to use
-
getRequiredJavaVersion
int getRequiredJavaVersion()Get the minimum Java version required by this implementation.- Returns:
- the minimum Java version (e.g., 8, 17, 25)
-
initialize
Initialize the DAVE implementation. Called when the voice connection is being established.- Throws:
DAVEProvider.DAVEException- if initialization fails
-
shutdown
void shutdown()Clean up resources when the voice connection is closed. -
getNativeImplementation
Object getNativeImplementation()Get the native library instance for JDA's VoiceEncryption interface. This should return an object compatible with JDA's DAVE requirements.- Returns:
- the native DAVE implementation object
-