Getting error TypeError: client.actions.InteractionCreate.hasPermissionshandle is not a function
I'm getting the error
TypeError: client.actions.InteractionCreate.hasPermissionshandle is not a function
for some reason and I can't figure it out
https://pastebin.com/yYf9kj5NPastebin
const { SlashCommandBuilder } = require('@discordjs/builders');modu...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
8 Replies
- 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.Can you share the full error please?
That kinda suggests you've accidentally modified a discord.js file
C:\projects\SulfurBot\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4
client.actions.InteractionCreate.hasPermissionshandle(packet.d);
^
TypeError: client.actions.InteractionCreate.hasPermissionshandle is not a function
at module.exports [as INTERACTION_CREATE] (C:\projects\SulfurBot\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (C:\projects\SulfurBot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:354:31) at WebSocketManager.<anonymous> (C:\projects\SulfurBot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:238:12) at WebSocketManager.emit (C:\projects\SulfurBot\node_modules@vladfrangu\async_event_emitter\dist\index.js:282:31) at WebSocketShard.<anonymous> (C:\projects\SulfurBot\node_modules@discordjs\ws\dist\index.js:1103:51) at WebSocketShard.emit (C:\projects\SulfurBot\node_modules@vladfrangu\async_event_emitter\dist\index.js:282:31) at WebSocketShard.onMessage (C:\projects\SulfurBot\node_modules@discordjs\ws\dist\index.js:938:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) Node.js v18.16.0 wait i think its referring to this:
at WebSocketManager.handlePacket (C:\projects\SulfurBot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:354:31) at WebSocketManager.<anonymous> (C:\projects\SulfurBot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:238:12) at WebSocketManager.emit (C:\projects\SulfurBot\node_modules@vladfrangu\async_event_emitter\dist\index.js:282:31) at WebSocketShard.<anonymous> (C:\projects\SulfurBot\node_modules@discordjs\ws\dist\index.js:1103:51) at WebSocketShard.emit (C:\projects\SulfurBot\node_modules@vladfrangu\async_event_emitter\dist\index.js:282:31) at WebSocketShard.onMessage (C:\projects\SulfurBot\node_modules@discordjs\ws\dist\index.js:938:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) Node.js v18.16.0 wait i think its referring to this:
No it isnt
Here's what that line should look like: https://github.com/discordjs/discord.js/blob/main/packages/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js#L4
GitHub
discord.js/packages/discord.js/src/client/websocket/handlers/INTERA...
A powerful JavaScript library for interacting with the Discord API - discord.js/packages/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js at main · discordjs/discord.js
You've somehow modified it by mistake
A reinstall should fix it
thats weird
that was the problem
thanks