Attempt to process volume option

This commit is contained in:
abalabahaha
2016-03-12 21:27:48 -08:00
parent 13e8a39f9f
commit 25f25f5506
2 changed files with 18 additions and 1 deletions

View File

@@ -254,6 +254,9 @@ var VoiceConnection = (function (_EventEmitter) {
callback = options;
options = {};
}
if (options.volume != null) {
this.setVolume(options.volume);
}
return new Promise(function (resolve, reject) {
_this.encoder.encodeFile(stream, options)["catch"](error).then(function (data) {
self.streamProc = data.proc;
@@ -283,6 +286,9 @@ var VoiceConnection = (function (_EventEmitter) {
callback = options;
options = {};
}
if (options.volume != null) {
this.setVolume(options.volume);
}
return new Promise(function (resolve, reject) {
_this2.encoder.encodeStream(stream, options)["catch"](error).then(function (data) {
self.streamProc = data.proc;
@@ -312,6 +318,9 @@ var VoiceConnection = (function (_EventEmitter) {
callback = options;
options = {};
}
if (options.volume != null) {
this.setVolume(options.volume);
}
return new Promise(function (resolve, reject) {
_this3.encoder.encodeArbitraryFFmpeg(ffmpegOptions)["catch"](error).then(function (data) {
self.streamProc = data.proc;