Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

204
Vistas
discordjs/voice not playing audio

I am trying to make a bot to play music, currently I am trying using a audio file on my computer which I know works as it plays when used with mpg123. The bot can join the voice channel but when this function is called it does not produce any sound, does anyone have any suggestions?

const { joinVoiceChannel, createAudioPlayer, createAudioResource } = require('@discordjs/voice');

...

function play(connection, messageCreate, server) {
    let resource = createAudioResource(__dirname + '/try.mp3', { inlineVolume : true });
    const player = createAudioPlayer();
    connection.subscribe(player);
    player.play(resource, {seek: 0, volume: 1.0});
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The most likely problem I can think of is a common one: you need the GUILD_VOICE_STATES intent for your bot the join a voice channel. If you don't have it, it'll show up as having joined, but actually still be in the signalling state which prohibits it from doing anything.

If you do have that intent already, or adding it did not solve your problem, consider debugging your dependencies with the method outlined here.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda