mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 14:38:49 +00:00
Merge pull request #112 from mariusbegby/filters-optimizatin
Filters optimalization
This commit is contained in:
2 files changed
+22
-9
No files matched your search
@@ -132,6 +132,14 @@ module.exports = {
|
||||
});
|
||||
}
|
||||
|
||||
// if bassboost is enabled and not normalizer, also enable normalizer to avoid distrorion
|
||||
if (
|
||||
(confirmation.values.includes('bassboost_low') || confirmation.values.includes('bassboost')) &&
|
||||
!confirmation.values.includes('normalizer')
|
||||
) {
|
||||
confirmation.values.push('normalizer');
|
||||
}
|
||||
|
||||
// Enable provided filters
|
||||
queue.filters.ffmpeg.toggle(confirmation.values);
|
||||
|
||||
@@ -152,15 +160,14 @@ module.exports = {
|
||||
`**${
|
||||
embedOptions.icons.success
|
||||
} Filters toggled**\nNow using these filters:\n${confirmation.values
|
||||
.map(
|
||||
(enabled) =>
|
||||
`\`${
|
||||
ffmpegFilterOptions.availableFilters.find(
|
||||
(filter) => enabled == filter.value
|
||||
).label
|
||||
}\``
|
||||
)
|
||||
.join(', ')}.`
|
||||
.map((enabledFilter) => {
|
||||
let filter = ffmpegFilterOptions.availableFilters.find(
|
||||
(filter) => enabledFilter == filter.value
|
||||
);
|
||||
|
||||
return `- **${filter.emoji} ${filter.label}**`;
|
||||
})
|
||||
.join('\n')}`
|
||||
)
|
||||
.setColor(embedOptions.colors.success)
|
||||
],
|
||||
|
||||
@@ -175,6 +175,12 @@ module.exports.ffmpegFilterOptions = {
|
||||
value: 'treble',
|
||||
description: 'Increase the high frequencies.',
|
||||
emoji: '🎼'
|
||||
},
|
||||
{
|
||||
label: 'Normalizer',
|
||||
value: 'normalizer',
|
||||
description: 'Normalize the audio (avoid distortion).',
|
||||
emoji: '🎶'
|
||||
}
|
||||
]
|
||||
};
|
||||
Reference in new issue
Block a user