Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

234
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda