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

128
Views
Discord js Voice - AudioResource

In the DiscordJs Voice documentation it is stated that AudioPlayer is reusable, so I can create only one instance of it and use it all the time. However, I did not find any mentions about reusability of AudioResource. For example, I want to play the first song in the array:

resource = createAudioResource(playlist[0]);
player.play(resource);

But if I want to create queue by adding more songs to the playlist, what should I do with the resource? Declare another resource1? Or can I do something like:

resource.read(playlist[1])
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Audio resources are not reusable. You will need to simply make another resource

You can however reuse the variable, not the resource

resource = createAudioResource(playlist[1])
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!