Setup
You'll need a build of Discord's libdave library as either libdave.dll, libdave.so or libdave.o in your apps executing directory or PATH. The library will resolve libdave and start using it automatically.
Force enable/disable
You can opt-in/opt-out of libdave with the following config option:
var client = new DiscordSocketClient(new DiscordSocketConfig()
{
EnableVoiceDaveEncryption = true,
...
});
libdave Log Sink
By default, libdave writes its logs to standard output, you can override that by specifying a custom log sink:
Discord.LibDave.Dave.SetLogSink(MyLogSink);
void MyLogSink(
Discord.LibDave.LoggingSeverity severity,
string filePath,
int lineNumber,
string message
)
{
// do what you want with the logs
Console.WriteLine($"[{severity} | LIBDAVE @ {file}#{line}]: {message}");
}