Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

226
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!