mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Fix redeclaration
This commit is contained in:
@@ -136,7 +136,7 @@ var AudioEncoder = (function () {
|
||||
if (!command) return reject(new Error('FFMPEG not found. Make sure it is installed and in path.'));
|
||||
|
||||
// add options discord.js needs
|
||||
var ffmpegOptions = ffmpegOptions.concat(['-f', 's16le', '-ar', '48000', '-ac', 2, 'pipe:1']);
|
||||
ffmpegOptions = ffmpegOptions.concat(['-f', 's16le', '-ar', '48000', '-ac', 2, 'pipe:1']);
|
||||
var enc = _child_process2["default"].spawn(command, ffmpegOptions);
|
||||
|
||||
_this3.hookEncodingProcess(resolve, reject, enc);
|
||||
|
||||
@@ -276,12 +276,12 @@ var VoiceConnection = (function (_EventEmitter) {
|
||||
}
|
||||
options.volume = options.volume !== undefined ? options.volume : this.getVolume();
|
||||
return new Promise(function (resolve, reject) {
|
||||
_this.encoder.encodeFile(stream, options)["catch"](error).then(function (data) {
|
||||
_this.encoder.encodeFile(stream, options).then(function (data) {
|
||||
self.streamProc = data.proc;
|
||||
var intent = self.playStream(data.stream, 2);
|
||||
resolve(intent);
|
||||
callback(null, intent);
|
||||
});
|
||||
})["catch"](error);
|
||||
function error() {
|
||||
var e = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];
|
||||
|
||||
@@ -308,13 +308,13 @@ var VoiceConnection = (function (_EventEmitter) {
|
||||
}
|
||||
options.volume = options.volume !== undefined ? options.volume : this.getVolume();
|
||||
return new Promise(function (resolve, reject) {
|
||||
_this2.encoder.encodeStream(stream, options)["catch"](error).then(function (data) {
|
||||
_this2.encoder.encodeStream(stream, options).then(function (data) {
|
||||
self.streamProc = data.proc;
|
||||
self.instream = data.instream;
|
||||
var intent = self.playStream(data.stream);
|
||||
resolve(intent);
|
||||
callback(null, intent);
|
||||
});
|
||||
})["catch"](error);
|
||||
function error() {
|
||||
var e = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];
|
||||
|
||||
@@ -343,13 +343,13 @@ var VoiceConnection = (function (_EventEmitter) {
|
||||
}
|
||||
options.volume = options.volume !== undefined ? options.volume : this.getVolume();
|
||||
return new Promise(function (resolve, reject) {
|
||||
_this3.encoder.encodeArbitraryFFmpeg(ffmpegOptions, options)["catch"](error).then(function (data) {
|
||||
_this3.encoder.encodeArbitraryFFmpeg(ffmpegOptions, options).then(function (data) {
|
||||
self.streamProc = data.proc;
|
||||
self.instream = data.instream;
|
||||
var intent = self.playStream(data.stream);
|
||||
resolve(intent);
|
||||
callback(null, intent);
|
||||
});
|
||||
})["catch"](error);
|
||||
function error() {
|
||||
var e = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user