#throw new Error("Expected a voice channel");

8 messages · Page 1 of 1 (latest)

lament heath
#

Error: Expected a voice channel
at _Player.play

This error is showing while I try to invite a bot to voice channel.

vapid needleBOT
#

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

lament heath
#

VERSIONS:
[email protected]
[email protected]

ERROR:
C:\Users\Div\Desktop\bot\node_modules\discord-player\dist\index.js:3025
throw new Error("Expected a voice channel");
^

Error: Expected a voice channel
    at _Player.play (C:\Users\Div\Desktop\bot\node_modules\discord-player\dist\index.js:3025:13)
    at Object.run (C:\Users\Div\Desktop\bot\commands\play.js:32:43)
    at handleCommand (C:\Users\Div\Desktop\bot\bot.js:69:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v19.6.1
#

CODE:
const queue = await client.player.play(interaction.guild)
if (!queue.connection) await queue.connect(interaction.member.voice.channel)

#

ISSUE:
This code was working fine until I updated "discord-player" at version "^6.3.0"

jagged void
#

We‘re not discord-player support though, ask them.

lament heath
#

How? Where?

jagged void
#

Try their website, they have an issue tracker and a discord server for sure.