Problem

TypeError: options.getSubcommandGroup is not a function
at Object.execute (C:\Users\PC\Desktop\LunarDSC official 2.0\srcs\Commands\level\levelSystem.js:93:28)
at Object.execute (C:\Users\PC\Desktop\LunarDSC official 2.0\src\Events\client\interactionCreate.js:13:23)
at Client.<anonymous> (C:\Users\PC\Desktop\LunarDSC official 2.0\src\functions\handlers\HandlerEvent.js:20:23)
at Client.emit (node:events:518:28)
at InteractionCreateAction.handle (C:\Users\PC\Desktop\LunarDSC official 2.0\node_modules\discord.js\src\client\actions\InteractionCreate.js:97:12)
at module.exports [as INTERACTION_CREATE] (C:\Users\PC\Desktop\LunarDSC official 2.0\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (C:\Users\PC\Desktop\LunarDSC official 2.0\node_modules\discord.js\src\client\websocket\WebSocketManager.js:355:31)
at WebSocketManager.<anonymous> (C:\Users\PC\Desktop\LunarDSC official 2.0\node_modules\discord.js\src\client\websocket\WebSocketManager.js:239:12)
at WebSocketManager.emit (C:\Users\PC\Desktop\LunarDSC official 2.0\node_modules\@vladfrangu\async_event_emitter\dist\index.cjs:282:31)
at WebSocketShard.<anonymous> (C:\Users\PC\Desktop\LunarDSC official 2.0\node_modules\@discordjs\ws\dist\index.js:1173:51)
TypeError: options.getSubcommandGroup is not a function
at Object.execute (C:\Users\PC\Desktop\LunarDSC official 2.0\srcs\Commands\level\levelSystem.js:93:28)
at Object.execute (C:\Users\PC\Desktop\LunarDSC official 2.0\src\Events\client\interactionCreate.js:13:23)
at Client.<anonymous> (C:\Users\PC\Desktop\LunarDSC official 2.0\src\functions\handlers\HandlerEvent.js:20:23)
at Client.emit (node:events:518:28)
at InteractionCreateAction.handle (C:\Users\PC\Desktop\LunarDSC official 2.0\node_modules\discord.js\src\client\actions\InteractionCreate.js:97:12)
at module.exports [as INTERACTION_CREATE] (C:\Users\PC\Desktop\LunarDSC official 2.0\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (C:\Users\PC\Desktop\LunarDSC official 2.0\node_modules\discord.js\src\client\websocket\WebSocketManager.js:355:31)
at WebSocketManager.<anonymous> (C:\Users\PC\Desktop\LunarDSC official 2.0\node_modules\discord.js\src\client\websocket\WebSocketManager.js:239:12)
at WebSocketManager.emit (C:\Users\PC\Desktop\LunarDSC official 2.0\node_modules\@vladfrangu\async_event_emitter\dist\index.cjs:282:31)
at WebSocketShard.<anonymous> (C:\Users\PC\Desktop\LunarDSC official 2.0\node_modules\@discordjs\ws\dist\index.js:1173:51)
11 Replies
d.js toolkit
d.js toolkit•10mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - 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! - ✅ Marked as resolved by staff
D4rck_King 🖤
D4rck_King 🖤OP•10mo ago
how can i solve it?
d.js docs
d.js docs•10mo ago
To share long code snippets, use a service like gist, sourcebin, starbin, or similar instead of posting them as large code blocks or files.
D4rck_King 🖤
D4rck_King 🖤OP•10mo ago
how is it possible that I put const { options } = interaction
D4rck_King 🖤
D4rck_King 🖤OP•10mo ago
SourceBin
problem
Instantly share your code with the world.
D4rck_King 🖤
D4rck_King 🖤OP•10mo ago
I can't solve it, can you help me? Please If so, I can also send that file to understand where I'm wrong yes
d.js docs
d.js docs•10mo ago
The order of function parameters must match between definition and function call.
function execute(client, interaction) { ... };
execute(interaction, client);
function execute(client, interaction) { ... };
execute(interaction, client);
- mismatch! you pass an interaction where the client is expected - mismatch! you pass the client where an interaction is expected
D4rck_King 🖤
D4rck_King 🖤OP•10mo ago
SourceBin
interactionCreate
Instantly share your code with the world.
D4rck_King 🖤
D4rck_King 🖤OP•10mo ago
SourceBin
handlerCommand
Instantly share your code with the world.
D4rck_King 🖤
D4rck_King 🖤OP•10mo ago
yes, I solved it, thank you very much for your help and time
Want results from more Discord servers?
Add your server