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 toolkit12mo 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
Syjalo12mo ago
Did you assigned something to client.application? Log it console.log(client.application) Before client.login()
Chong Qing
Chong Qing12mo 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
Syjalo12mo ago
Yes, but admins of a server can change it in their server
Chong Qing
Chong Qing12mo ago
ye still , any help with prev issue?
treble/luna
treble/luna12mo ago
You re-assign client.application somewhere
Chong Qing
Chong Qing12mo ago
ok how 💀
and where 💀
treble/luna
treble/luna12mo ago
How would i know? Its your code
Chong Qing
Chong Qing12mo ago
ok ignore 'where' part
treble/luna
treble/luna12mo ago
Same answer still applies
Chong Qing
Chong Qing12mo ago
okay lol fixed