- What's your exact discord.js
npm list discord.jsand nodenode -vversion? - 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!
#help voice commands
23 messages · Page 1 of 1 (latest)
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
What version of djs are you using? npm is discord.js
14.14.1
my bot was working a couple of days ago, now I decided to try to run it to write code, but when I wrote the command / mute in the discord, it started to give this error, although nothing happened to the bot for a couple of days
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
it's no longer a matter of a system with voice channels, but in principle with all commands, they suddenly stopped working
Try to reinstall discord.js, looks like your install got corrupted/lost some files
How did you reinstall?
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": ""
}```
That is just your package.json. Changing something there does nothing unless you also run npm to tell it to do something
discord.js includes multiple sub-packages, installing these separately can mess with internal code:
[0;31mnpm [0;0muninstall discord-api-types @discordjs/rest @discordjs/builders
[0;34myarn [0;0mremove discord-api-types @discordjs/rest @discordjs/builders
[0;33mpnpm [0;0mremove discord-api-types @discordjs/rest @discordjs/builders
oh
I wonder what could have been damaged if nothing happened to the code and to the bot itself, no operations took place
Everything works