diff --git a/classes/AudioServer.js b/classes/AudioServer.js index 5b3281d..860e8da 100644 --- a/classes/AudioServer.js +++ b/classes/AudioServer.js @@ -46,7 +46,11 @@ class AudioServer { }); const stats = await stat(this.buffer.file); this.buffer.size = stats.size; - this.buffer.threshold = (this.buffer.size / 100) / (!isNaN(config.audio?.threshold) || 30); + let divisor = 30; + if (!(isNaN(config.audio?.threshold))) { + divisor = config.audio.threshold; + } + this.buffer.threshold = (this.buffer.size / 100) / divisor; this.#announceAudioServer(); }