From 3c5665878beb353e9f99c71f861e72b7e5b0966a Mon Sep 17 00:00:00 2001 From: DevAndromeda <46562212+DevAndromeda@users.noreply.github.com> Date: Tue, 19 Jul 2022 19:48:30 +0545 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Better=20initial=20volume=20sett?= =?UTF-8?q?er?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Structures/Queue.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Structures/Queue.ts b/src/Structures/Queue.ts index 86ef7b6..e3d6f18 100644 --- a/src/Structures/Queue.ts +++ b/src/Structures/Queue.ts @@ -708,11 +708,11 @@ class Queue { this._filtersUpdate = options.filtersUpdate; const volumeTransformer = resource.volume as VolumeTransformer; + if (volumeTransformer && typeof this.options.initialVolume === "number") Reflect.set(volumeTransformer, "volume", Math.pow(this.options.initialVolume, 1.660964)); if (volumeTransformer?.hasSmoothness && typeof this.options.volumeSmoothness === "number") { if (typeof volumeTransformer.setSmoothness === "function") volumeTransformer.setSmoothness(this.options.volumeSmoothness || 0); } - this.setVolume(this.options.initialVolume); setTimeout(() => { this.connection.playStream(resource);