From 4294d267e7dd29d9e5a96aee3a72368619baf65c Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Wed, 28 Dec 2016 19:23:11 +0000 Subject: [PATCH] Add playFile back to voice connection --- src/client/voice/VoiceConnection.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 5c8d72771..afcc5b737 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -231,8 +231,9 @@ class VoiceConnection extends EventEmitter { * }) * .catch(console.error); */ - playFile(file, options) { - return this.playStream(fs.createReadStream(file), options); + playFile(file, { seek = 0, volume = 1, passes = 1 } = {}) { + const options = { seek, volume, passes }; + return this.player.playUnknownStream(file, options); } /**