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

233
Vistas
Discord JS - AudioPlayerStatus

Why does this function:

client.player.once(AudioPlayerStatus.Idle, () => {
            console.log(client.playlist);
            next.run(message, args, client);
            client.playlist.shift();
            return;
        });

is executed only when the resource already played, and not when I initialize AudioPlayer? Isn't it by default idle?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

From the @discordjs/voice documentation (reference here):

Both voice connections and audio players are stateful, and you can subscribe to changes in their state as they progress through their respective life cycles.

The AudioPlayer starts in Idle, but do not trigger this kind of event because these events are only triggered when changing states.

That's why you can see the event firing only when resource already played.

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