#Audio Resource not playing

10 messages · Page 1 of 1 (latest)

twin bramble
#

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!

tame thornBOT
#

• 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.

rocky vector
#

we do not support tos violations

twin bramble
#

What?

rocky vector
# twin bramble What?

streaming from youtube to discord is against tos
are you not using play-dl, a youtube streaming module?

twin bramble
#

And it's a private bot btw

twin bramble
#

Oh

#

I changed it SoundCloud btw

#

I'm sorry