fix(AudioPlayer): add opus to destructured key of stream options

This fixes #2079 (VoiceConnection#playOpusStream being broken)
This commit is contained in:
Pascal
2018-02-05 10:42:47 +01:00
parent 1f14758e0c
commit 96904b1826

View File

@@ -156,8 +156,8 @@ class AudioPlayer extends EventEmitter {
return dispatcher;
}
createDispatcher(stream, { seek = 0, volume = 1, passes = 1 } = {}) {
const options = { seek, volume, passes };
createDispatcher(stream, { seek = 0, volume = 1, passes = 1, opus } = {}) {
const options = { seek, volume, passes, opus };
const dispatcher = new StreamDispatcher(this, stream, options);
dispatcher.on('end', () => this.destroyCurrentStream());