mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 22:15:29 +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
|
// Enable provided filters
|
||||||
queue.filters.ffmpeg.toggle(confirmation.values);
|
queue.filters.ffmpeg.toggle(confirmation.values);
|
||||||
|
|
||||||
@@ -152,15 +160,14 @@ module.exports = {
|
|||||||
`**${
|
`**${
|
||||||
embedOptions.icons.success
|
embedOptions.icons.success
|
||||||
} Filters toggled**\nNow using these filters:\n${confirmation.values
|
} Filters toggled**\nNow using these filters:\n${confirmation.values
|
||||||
.map(
|
.map((enabledFilter) => {
|
||||||
(enabled) =>
|
let filter = ffmpegFilterOptions.availableFilters.find(
|
||||||
`\`${
|
(filter) => enabledFilter == filter.value
|
||||||
ffmpegFilterOptions.availableFilters.find(
|
);
|
||||||
(filter) => enabled == filter.value
|
|
||||||
).label
|
return `- **${filter.emoji} ${filter.label}**`;
|
||||||
}\``
|
})
|
||||||
)
|
.join('\n')}`
|
||||||
.join(', ')}.`
|
|
||||||
)
|
)
|
||||||
.setColor(embedOptions.colors.success)
|
.setColor(embedOptions.colors.success)
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -175,6 +175,12 @@ module.exports.ffmpegFilterOptions = {
|
|||||||
value: 'treble',
|
value: 'treble',
|
||||||
description: 'Increase the high frequencies.',
|
description: 'Increase the high frequencies.',
|
||||||
emoji: '🎼'
|
emoji: '🎼'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Normalizer',
|
||||||
|
value: 'normalizer',
|
||||||
|
description: 'Normalize the audio (avoid distortion).',
|
||||||
|
emoji: '🎶'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
Reference in new issue
Block a user