#Bot playing audio but with no sound

4 messages · Page 1 of 1 (latest)

alpine currentBOT
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

fierce trellis
#
// Functions
async function initializeQuiz(_interaction){

    let Voice = _interaction.member.voice.channel

    if(!Voice){
        return _interaction.reply({
            content: "You need to join a Voice Channel to use this command.",
            ephemeral: true
        })
    }

    // Creates the connection
    const Connection = joinVoiceChannel({
        channelId: _interaction.member.voice.channel.id,
        guildId: _interaction.guild.id,
        adapterCreator: _interaction.guild.voiceAdapterCreator
    })

    // Creates the player
    const Player = createAudioPlayer()

    // Creates the resource
    const Resource = createAudioResource(join(__dirname, "MP3/TerrorRadius/TerrorRadius_Artist.mp3"), {
        metadata: {
            title: "Dead by Daylight - Artist Chase Theme"
        },
        inlineVolume: true
    })
    Resource.volume.setVolume(0.5)

    Player.play(Resource)
    Connection.subscribe(Player)

}
jovial scaffold
#

Make sure that you have the voice intent and that you file path is relative to your working directory