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

122
Views
El bot no se unirá al canal de voz

Tengo un problema donde me uní a un canal de voz y quiero reproducir una canción pero el bot me dice que me una a un canal de voz aunque ya estoy en uno aquí hay una imagen

Aquí está mi código:

 import ytdl from 'ytdl-core' import ytSearch from 'yt-search' export const name = 'play'; export const description = 'Play a desired song!'; export const args = 1; export const usage = '{song}'; export const execute = async (message, args) => { const voiceChannel = message.member.voice.channel; if (!voiceChannel) return message.channel.send('Please join a voice channel first!'); const connection = await joinVoiceChannel(); const videoFinder = async (query) => { const videoResult = await ytSearch(query); return (videoResult.videos.length > 1) ? videoResult.videos[0] : null; } const video = await videoFinder(args.join(' ')); if (video) { const stream = ytdl(video.url, { filter: 'audioonly' }); connection.play(stream, { seek: 0, volume: 1 }) .on('finish', () => { voiceChannel.leave(); }); await message.reply(`:arrow_forward: Now playing ***${video.title}***`) } else { message.channel.send(`I could not find the video :c`) }

}

Esta es la primera vez que pido ayuda aquí, así que si algo no está claro, ¡hazme cualquier pregunta!

La ayuda sería muy apreciada (creo que es porque joinVoiceChannel(); no es una función).

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!