full test

This commit is contained in:
NoLogicAlan committed 2026-05-02 23:20:40 +03:00
1 parent 3c938c5c32
commit c330a7b605
4 files changed
+221 -54

No files matched your search

+11 -3
View File
@@ -362,7 +362,8 @@ export async function run(msg) {
if (!filter) return;
const track = player.queue.getCurrent();
if (!track) {
const previousActiveKeys = [...activeKeys];
if (!track && false) { // pending filters are allowed; keep old fallback block unreachable
await menuMsg.editEmbed({
embeds: [buildPageEmbed(page, activeKeys, null)]
}).catch(() => {});
@@ -401,9 +402,10 @@ export async function run(msg) {
}
: null;
const { ok, reason } = await player.applyFilter(mergedPayload, meta);
const { ok, reason, pending } = await player.applyFilter(mergedPayload, meta);
if (!ok) {
activeKeys = previousActiveKeys;
const errEmbed = new EmbedBuilder()
.setColor(getGlobalColor())
.setDescription(
@@ -422,7 +424,13 @@ export async function run(msg) {
// Update active key and refresh embed (player.activeFilter is already updated by applyFilter)
activeKeys = meta ? meta.key.split("+") : [];
const successMsg = filter.key === "off"
const successMsg = pending
? (filter.key === "off"
? "Filter cleared. Original audio will be used on the next playable track."
: activeKeys.includes(filter.key)
? `${filter.label} saved. It will apply on the next playable track.`
: `${filter.label} removed. The next playable track will use the updated filters.`)
: filter.key === "off"
? "🔇 Filters cleared — original audio restored."
: activeKeys.includes(filter.key)
? `${filter.emoji} **${filter.label}** applied!`
+1 -1
View File
@@ -41,7 +41,7 @@ export const command = new CommandBuilder()
.setDescription("The search provider. Default: YouTube Music. Or use inline prefix: sp:, dz:, am:, yt:, sc: etc.", "options.play.provider")
.addFlagAliases("p", "u", "use")
.addChoices(...PROVIDER_CHOICES)
.setDefault("yt")
.setDefault("ytm")
, true)
.addAlias("p");