From b236371abc30741cbc02a8f0faf80263d76a9226 Mon Sep 17 00:00:00 2001 From: Marius Begby Date: Mon, 24 Jul 2023 13:03:38 +0200 Subject: [PATCH] fix: enable normalizer filter when bassboost is chosen --- src/commands/player/filters.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/commands/player/filters.js b/src/commands/player/filters.js index 68b89c6..90fc4ae 100644 --- a/src/commands/player/filters.js +++ b/src/commands/player/filters.js @@ -132,8 +132,14 @@ module.exports = { }); } + let filtersToEnable = confirmation.values; + // if bassboost is enabled, also enable normalizer to avoid distrorion + if (confirmation.values.includes('bassboost_low') || confirmation.values.includes('bassboost')) { + filtersToEnable.push('normalizer'); + } + // Enable provided filters - queue.filters.ffmpeg.toggle(confirmation.values); + queue.filters.ffmpeg.toggle(filtersToEnable); logger.debug( `[Shard ${interaction.guild.shardId}] Enabled filters ${confirmation.values.join(', ')} for command ${