2 days and i'm still trying to fix this internal error :(

client.application._patch(data.application);
^

TypeError: client.application._patch is not a function
at module.exports [as READY] (/Users/roopa/Desktop/projects/LLbot/node_modules/discord.js/src/client/websocket/handlers/READY.js:21:24)
at WebSocketManager.handlePacket (/Users/roopa/Desktop/projects/LLbot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:354:31)
at WebSocketManager.<anonymous> (/Users/roopa/Desktop/projects/LLbot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:238:12)
at WebSocketManager.emit (/Users/roopa/Desktop/projects/LLbot/node_modules/@vladfrangu/async_event_emitter/dist/index.js:282:31)
at WebSocketShard.<anonymous> (/Users/roopa/Desktop/projects/LLbot/node_modules/@discordjs/ws/dist/index.js:1103:51)
at WebSocketShard.emit (/Users/roopa/Desktop/projects/LLbot/node_modules/@vladfrangu/async_event_emitter/dist/index.js:282:31)
at WebSocketShard.onMessage (/Users/roopa/Desktop/projects/LLbot/node_modules/@discordjs/ws/dist/index.js:938:14)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.2.0
client.application._patch(data.application);
^

TypeError: client.application._patch is not a function
at module.exports [as READY] (/Users/roopa/Desktop/projects/LLbot/node_modules/discord.js/src/client/websocket/handlers/READY.js:21:24)
at WebSocketManager.handlePacket (/Users/roopa/Desktop/projects/LLbot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:354:31)
at WebSocketManager.<anonymous> (/Users/roopa/Desktop/projects/LLbot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:238:12)
at WebSocketManager.emit (/Users/roopa/Desktop/projects/LLbot/node_modules/@vladfrangu/async_event_emitter/dist/index.js:282:31)
at WebSocketShard.<anonymous> (/Users/roopa/Desktop/projects/LLbot/node_modules/@discordjs/ws/dist/index.js:1103:51)
at WebSocketShard.emit (/Users/roopa/Desktop/projects/LLbot/node_modules/@vladfrangu/async_event_emitter/dist/index.js:282:31)
at WebSocketShard.onMessage (/Users/roopa/Desktop/projects/LLbot/node_modules/@discordjs/ws/dist/index.js:938:14)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.2.0
i have no idea how to fix this lol
11 Replies
d.js toolkit
d.js toolkit2y ago
• 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.
Syjalo
Syjalo2y ago
Did you assigned something to client.application? Log it console.log(client.application) Before client.login()
Chong Qing
Chong QingOP2y ago
oki i just logged .json of my slash commands :/ let me just remove my lock.js do you want full log? oh btw if we use .setDefaultMemberPermissions(PermissionsBitFields.Flags.Administrator) only members with admin permissions can use that command right
Syjalo
Syjalo2y ago
Yes, but admins of a server can change it in their server
Chong Qing
Chong QingOP2y ago
ye still , any help with prev issue?
treble/luna
treble/luna2y ago
You re-assign client.application somewhere
Chong Qing
Chong QingOP2y ago
ok how 💀
and where 💀
treble/luna
treble/luna2y ago
How would i know? Its your code
Chong Qing
Chong QingOP2y ago
ok ignore 'where' part
treble/luna
treble/luna2y ago
Same answer still applies
Chong Qing
Chong QingOP2y ago
okay lol fixed
Want results from more Discord servers?
Add your server