mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Attempt to process volume option
This commit is contained in:
@@ -217,6 +217,9 @@ export default class VoiceConnection extends EventEmitter {
|
||||
callback = options;
|
||||
options = {};
|
||||
}
|
||||
if (options.volume != null) {
|
||||
this.setVolume(options.volume);
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
this.encoder
|
||||
.encodeFile(stream, options)
|
||||
@@ -243,6 +246,9 @@ export default class VoiceConnection extends EventEmitter {
|
||||
callback = options;
|
||||
options = {};
|
||||
}
|
||||
if (options.volume != null) {
|
||||
this.setVolume(options.volume);
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
this.encoder
|
||||
.encodeStream(stream, options)
|
||||
@@ -270,6 +276,9 @@ export default class VoiceConnection extends EventEmitter {
|
||||
callback = options;
|
||||
options = {};
|
||||
}
|
||||
if (options.volume != null) {
|
||||
this.setVolume(options.volume);
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
this.encoder
|
||||
.encodeArbitraryFFmpeg(ffmpegOptions)
|
||||
@@ -280,7 +289,6 @@ export default class VoiceConnection extends EventEmitter {
|
||||
var intent = self.playStream(data.stream);
|
||||
resolve(intent);
|
||||
callback(null, intent);
|
||||
|
||||
});
|
||||
function error(e = true) {
|
||||
reject(e);
|
||||
|
||||
Reference in New Issue
Block a user