#Bot playing audio but with no sound
4 messages · Page 1 of 1 (latest)
// 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)
}
• 14.3.0 / v16.13.1
Make sure that you have the voice intent and that you file path is relative to your working directory