For some reason this wont play the audio i tried installing the ffpeg package thing but still wont work!
const search = await play.search(prompt)
const stream = await play.stream(search[0].url)
const player = voice.createAudioPlayer({
behaviors: {
noSubscriber: voice.NoSubscriberBehavior.Play
}
})
const resource = voice.createAudioResource(stream.stream, {
inputType: stream.type
})
connection.subscribe(player)
player.play(resource)
const embed = new Discord.EmbedBuilder()
.setDescription(`*Now playing: ${search[0].title} by ${search[0].channel}\nURL: ${search[0].url}*`)
.setColor('Red')
.setImage(search[0].thumbnails[0].url)
return message.channel.send({ embeds: [embed] })
Please help!