#help voice commands

23 messages · Page 1 of 1 (latest)

trail ingotBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • Not a discord.js issue? Check out #1081585952654360687.
  • Consider reading #how-to-get-help to improve your question!
  • Explain what exactly your issue is.
  • Post the full error stack trace, not just the top part!
  • Show your code!
  • Issue solved? Press the button!
floral lance
#
D:\discordmdr\node_modules\discord.js\src\client\websocket\WebSocketManager.js:355
      PacketHandlers[packet.t](this.client, packet, shard);
                              ^

TypeError: PacketHandlers[packet.t] is not a function
    at WebSocketManager.handlePacket (D:\discordmdr\node_modules\discord.js\src\client\websocket\WebSocketManager.js:355:31)
    at WebSocketManager.<anonymous> (D:\discordmdr\node_modules\discord.js\src\client\websocket\WebSocketManager.js:239:12)
    at WebSocketManager.emit (D:\discordmdr\node_modules\@vladfrangu\async_event_emitter\dist\index.cjs:282:31)
    at WebSocketShard.<anonymous> (D:\discordmdr\node_modules\@discordjs\ws\dist\index.js:1173:51)
    at WebSocketShard.emit (D:\discordmdr\node_modules\@vladfrangu\async_event_emitter\dist\index.cjs:282:31)
    at WebSocketShard.onMessage (D:\discordmdr\node_modules\@discordjs\ws\dist\index.js:988:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v21.5.0
little slate
#

What version of djs are you using? npm is discord.js

floral lance
little slate
#

Did that happen once or consistently keeps on happening?

#

Add client.on('raw', console.log) to the file you define your client in and show the output of the last log before the error occurred if you can reproduce it

#

Also not really a voice issue is it? Would be better fit for #986520997006032896

floral lance
little slate
#

Try to reinstall discord.js, looks like your install got corrupted/lost some files

floral lance
#

one second

#

The error still remains

little slate
#

How did you reinstall?

floral lance
#

yes

#
  "dependencies": {
    "@discordjs/builders": "^1.7.0",
    "discord.js": "^14.14.1",
    "dotenv": "^16.3.2",
    "uuid": "^9.0.1"
  },
  "name": "discordmdr",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "description": ""
}```
little slate
#

That is just your package.json. Changing something there does nothing unless you also run npm to tell it to do something

high lavaBOT
#

discord.js includes multiple sub-packages, installing these separately can mess with internal code:

npm uninstall discord-api-types @discordjs/rest @discordjs/builders
yarn remove discord-api-types @discordjs/rest @discordjs/builders
pnpm remove discord-api-types @discordjs/rest @discordjs/builders
little slate
#

Also👆

#

Just remove discord.js like that too and then install it again

floral lance
#

I wonder what could have been damaged if nothing happened to the code and to the bot itself, no operations took place

floral lance