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

120
Views
Problema de reproducción de audio de Discord

Explicación

Tengo este código que reproduce audio de video de youtube en canales de voz.

Cuando se une al canal, aparece un error que dice "ffmpeg no encontrado". Ejecuté el comando de terminal "npm i ffmpeg-static" y funcionó bien, pero después de un par de minutos aparece un error largo y la música deja de reproducirse.

Este es mi código:

 client.on("ready", async () => { for (const channelId of Channels) { joinChannel(channelId); await new Promise(res => setTimeout(()=>res(2), 500)) } function joinChannel(channelId) { client.channels.fetch(channelId).then(channel => { const VoiceConnection = joinVoiceChannel({ channelId: channel.id, guildId: channel.guild.id, adapterCreator: channel.guild.voiceAdapterCreator }); const resource = createAudioResource(ytdl("https://youtu.be/0J2gdL87fVs", { filter: "audioonly" }), { inlineVolume: true }); resource.volume.setVolume(0.2); const player = createAudioPlayer() VoiceConnection.subscribe(player); player.play(resource); player.on("idle", () => { try { player.stop() }catch (e) {} try { VoiceConnection.destory() }catch (e) {} joinChannel(channelId) }) }).catch(console.error) } })
about 4 years ago · Juan Pablo Isaza
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!