Androz2091 / discord-player

🎧 Complete framework to simplify the implementation of music commands using discord.js v14
https://discord-player.js.org/
MIT License
589 stars 192 forks source link

Encountering an error when creating a queue #1886

Closed JefferyPlayz closed 7 months ago

JefferyPlayz commented 7 months ago

Describe the bug When I run my code I get the error,

TypeError: Cannot read properties of undefined (reading 'createQueue')
    at Object.run (C:\Users\jagop\Desktop\Coding\DiscordBots\JBOT\src\commands\Music Bot\play.js:9:39)
    at Client.<anonymous> (C:\Users\jagop\Desktop\Coding\DiscordBots\JBOT\node_modules\commandkit\dist\handlers\command-handler\CommandHandler.js:236:31)
    at Client.emit (node:events:525:35)
    at InteractionCreateAction.handle (C:\Users\jagop\Desktop\Coding\DiscordBots\JBOT\node_modules\discord.js\src\client\actions\InteractionCreate.js:97:12)
    at module.exports [as INTERACTION_CREATE] (C:\Users\jagop\Desktop\Coding\DiscordBots\JBOT\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36)
    at WebSocketManager.handlePacket (C:\Users\jagop\Desktop\Coding\DiscordBots\JBOT\node_modules\discord.js\src\client\websocket\WebSocketManager.js:354:31)
    at WebSocketManager.<anonymous> (C:\Users\jagop\Desktop\Coding\DiscordBots\JBOT\node_modules\discord.js\src\client\websocket\WebSocketManager.js:238:12)
    at WebSocketManager.emit (C:\Users\jagop\Desktop\Coding\DiscordBots\JBOT\node_modules\@vladfrangu\async_event_emitter\dist\index.js:282:31)
    at WebSocketShard.<anonymous> (C:\Users\jagop\Desktop\Coding\DiscordBots\JBOT\node_modules\@discordjs\ws\dist\index.js:1103:51)
    at WebSocketShard.emit (C:\Users\jagop\Desktop\Coding\DiscordBots\JBOT\node_modules\@vladfrangu\async_event_emitter\dist\index.js:282:31)

My code can be found here. Any help would be amazing!

To Reproduce Steps to reproduce the behavior:

  1. Run npm i discord-player
  2. Make some code using the createQueue() function
  3. See the above error

Expected behavior For it to create the queue and start playing a song in the Voice Channel

Please complete the following information:

Additional context Use this tutorial

twlite commented 7 months ago

the tutorial you are watching is outdated. See https://discord-player.js.org/guide/migrating/migrating-from-v5