mirror of
https://github.com/danbulant/discord.js
synced 2026-06-07 08:41:29 +00:00
Not everyone needs to set the volume
This commit is contained in:
parent
8614d4b2a5
commit
27a0361afc
2 changed files with 15 additions and 3 deletions
|
|
@ -252,6 +252,8 @@ var VoiceConnection = (function (_EventEmitter) {
|
||||||
if (typeof options === "function") {
|
if (typeof options === "function") {
|
||||||
// options is the callback
|
// options is the callback
|
||||||
callback = options;
|
callback = options;
|
||||||
|
}
|
||||||
|
if (typeof options !== "object") {
|
||||||
options = {};
|
options = {};
|
||||||
}
|
}
|
||||||
options.volume = options.volume !== undefined ? options.volume : this.getVolume();
|
options.volume = options.volume !== undefined ? options.volume : this.getVolume();
|
||||||
|
|
@ -282,6 +284,8 @@ var VoiceConnection = (function (_EventEmitter) {
|
||||||
if (typeof options === "function") {
|
if (typeof options === "function") {
|
||||||
// options is the callback
|
// options is the callback
|
||||||
callback = options;
|
callback = options;
|
||||||
|
}
|
||||||
|
if (typeof options !== "object") {
|
||||||
options = {};
|
options = {};
|
||||||
}
|
}
|
||||||
options.volume = options.volume !== undefined ? options.volume : this.getVolume();
|
options.volume = options.volume !== undefined ? options.volume : this.getVolume();
|
||||||
|
|
@ -312,6 +316,8 @@ var VoiceConnection = (function (_EventEmitter) {
|
||||||
if (typeof options === "function") {
|
if (typeof options === "function") {
|
||||||
// options is the callback
|
// options is the callback
|
||||||
callback = options;
|
callback = options;
|
||||||
|
}
|
||||||
|
if (typeof options !== "object") {
|
||||||
options = {};
|
options = {};
|
||||||
}
|
}
|
||||||
options.volume = options.volume !== undefined ? options.volume : this.getVolume();
|
options.volume = options.volume !== undefined ? options.volume : this.getVolume();
|
||||||
|
|
|
||||||
|
|
@ -212,8 +212,10 @@ export default class VoiceConnection extends EventEmitter {
|
||||||
if (typeof options === "function") {
|
if (typeof options === "function") {
|
||||||
// options is the callback
|
// options is the callback
|
||||||
callback = options;
|
callback = options;
|
||||||
options = {};
|
|
||||||
}
|
}
|
||||||
|
if (typeof options !== "object") {
|
||||||
|
options = {};
|
||||||
|
}
|
||||||
options.volume = options.volume !== undefined ? options.volume : this.getVolume();
|
options.volume = options.volume !== undefined ? options.volume : this.getVolume();
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
this.encoder
|
this.encoder
|
||||||
|
|
@ -239,8 +241,10 @@ export default class VoiceConnection extends EventEmitter {
|
||||||
if (typeof options === "function") {
|
if (typeof options === "function") {
|
||||||
// options is the callback
|
// options is the callback
|
||||||
callback = options;
|
callback = options;
|
||||||
options = {};
|
|
||||||
}
|
}
|
||||||
|
if (typeof options !== "object") {
|
||||||
|
options = {};
|
||||||
|
}
|
||||||
options.volume = options.volume !== undefined ? options.volume : this.getVolume();
|
options.volume = options.volume !== undefined ? options.volume : this.getVolume();
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
this.encoder
|
this.encoder
|
||||||
|
|
@ -267,8 +271,10 @@ export default class VoiceConnection extends EventEmitter {
|
||||||
if (typeof options === "function") {
|
if (typeof options === "function") {
|
||||||
// options is the callback
|
// options is the callback
|
||||||
callback = options;
|
callback = options;
|
||||||
options = {};
|
|
||||||
}
|
}
|
||||||
|
if (typeof options !== "object") {
|
||||||
|
options = {};
|
||||||
|
}
|
||||||
options.volume = options.volume !== undefined ? options.volume : this.getVolume();
|
options.volume = options.volume !== undefined ? options.volume : this.getVolume();
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
this.encoder
|
this.encoder
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue