Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

251
Vistas
distube filters not applying

I'm trying to make a discord slash commands filter using distube but when I use the slash command it didn't apply the filter that I picked but it sent the embed when filter is applied

Node: v17.7.2

Discord: ^13.2.0

can someone help me or tell me why the filter is not applying to the current music in vc?

thank you

const { MessageEmbed } = require('discord.js');
const ee = require('../../config.json');

module.exports = {
    name: 'filter',
    description: 'Add filter.',
    usage: 'filter',
    options: [
        {
            name: 'preset',
            description: 'Filters to add.',
            type: 'STRING',
            required: true,
            choices: [
                {
                    name: 'BassBoost',
                    value: 'bassboost'
                },
                {
                    name: 'Nightcore',
                    value: 'nightcore'
                },
                {
                    name: 'Vaporwave',
                    value: 'vaporwave'
                }
            ]
        }
    ],

    run: async(client, interaction, args) => {
        const filterss = interaction.options.getString('preset');
        const queue = client.distube.getQueue(interaction);

        let player = client.distube.filters;

        if(!queue) {
            return interaction.followUp({embeds: [
                new MessageEmbed()
                    .setColor(ee.color)
                    .setAuthor({name: 'Error', iconURL: 'https://i.imgur.com/81ig9jl.jpg'})
                    .setDescription('No songs are playing!')
            ]})
        }

        let thing = new MessageEmbed().setColor(ee.color);

        if (filterss == "nightcore") {
            thing.setDescription("✅ | Nightcore filter is now active!");
            player.nightcore = true;
        } else if (filterss == "bassboost") {
            thing.setDescription("✅ | BassBoost filter is now on!");
            player.bassboost = true;
        } else if (filterss == "vaporwave") {
            thing.setDescription("✅ | Vaporwave filter is now on!");
            player.vaporwave = true;
        }
        return interaction.followUp({ embeds: [thing] });
    }
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

From what I can find in the docs, it is recommended to use .setFilter() instead of calling client.distube.filters.<filter> = true.

I'd try changing your run code to use this instead and see if that works:

run: async(client, interaction, args) => {
    // Your queue check code here

    let thing = new MessageEmbed().setColor(ee.color);

    if (filterss == 'nightcore') {
        thing.setDescription('✅ | Nightcore filter is now active!');
        client.distube.setFilter(interaction, filterss);
    } else if (filterss == 'bassboost') {
        thing.setDescription('✅ | BassBoost filter is now on!');
        client.distube.setFilter(interaction, filterss);
    } else if (filterss == 'vaporwave') {
        thing.setDescription('✅ | Vaporwave filter is now on!');
        client.distube.setFilter(interaction, filterss);
    }
    return interaction.followUp({
        embeds: [thing],
    });
}
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda