Bot don't plays audio

pls help me Code:
let connection = DiscordVoice.joinVoiceChannel({
channelId: interaction.member.voice.channelId,
guildId: interaction.guild.id,
adapterCreator: interaction.guild.voiceAdapterCreator,
})

let resource = DiscordVoice.createAudioResource("http://wdr-1live-live.icecast.wdr.de/wdr/1live/live/mp3/128/stream.mp3", {
inlineVolume: true
})

let player = DiscordVoice.createAudioPlayer()
connection.subscribe(player)
player.play(resource)
let connection = DiscordVoice.joinVoiceChannel({
channelId: interaction.member.voice.channelId,
guildId: interaction.guild.id,
adapterCreator: interaction.guild.voiceAdapterCreator,
})

let resource = DiscordVoice.createAudioResource("http://wdr-1live-live.icecast.wdr.de/wdr/1live/live/mp3/128/stream.mp3", {
inlineVolume: true
})

let player = DiscordVoice.createAudioPlayer()
connection.subscribe(player)
player.play(resource)
Versions: "@discordjs/opus": "^0.8.0", "@discordjs/voice": "^0.13.0", "discord.js": "^14.5.0", node.js: v18.4.0
7 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
RichtigJoJo
RichtigJoJoOP3y ago
pls help
Zorceon127
Zorceon1273y ago
what does the error say or what happens
RichtigJoJo
RichtigJoJoOP3y ago
no error but the bot plays no sound
Zorceon127
Zorceon1273y ago
the link you sent is a bit werid the way it works so try another link maybe? ok i tested it with my code and it does work so something is probally wrong with the code here i would say make sure the intents for voice are added too that might be why
RichtigJoJo
RichtigJoJoOP3y ago
I have tried another link, it didn't work OMG THANKS it works!!
Zorceon127
Zorceon1273y ago
cool!
Want results from more Discord servers?
Add your server