Detecting user select menus

It wont print whenever I run it.
8 Replies
d.js toolkit
d.js toolkit17mo 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. - Issue solved? Press the button!
Toasty
ToastyOP17mo ago
client.on(Events.InteractionCreate, interaction => { if(!interaction.isChatInputCommand()) return; if(interaction.isUserSelectMenu()) { console.log('Hey') } console.log(client.commands) let command = client.commands.get(interaction.commandName); try { if(interaction.replied) return; command.execute(interaction) } catch (error){ console.error(error); } }); No Error Just wont print Whenever the select menu is ran
MrMythical
MrMythical17mo ago
If it is a select menu, then it can't be a chat input command... and that would make the first if statement return
Toasty
ToastyOP17mo ago
Oh Now I get this error TypeError: Cannot read properties of undefined (reading 'execute') at Client.<anonymous> (C:\Users\yeeca\Desktop\DMM Auto\index.js:32:17) at Client.emit (node:events:513:28) at InteractionCreateAction.handle (C:\Users\yeeca\Desktop\DMM Auto\node_modules\discord.js\src\client\actions\InteractionCreate.js:97:12) at module.exports [as INTERACTION_CREATE] (C:\Users\yeeca\Desktop\DMM Auto\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36) at WebSocketManager.handlePacket (C:\Users\yeeca\Desktop\DMM Auto\node_modules\discord.js\src\client\websocket\WebSocketManager.js:354:31) at WebSocketManager.<anonymous> (C:\Users\yeeca\Desktop\DMM Auto\node_modules\discord.js\src\client\websocket\WebSocketManager.js:238:12) at WebSocketManager.emit (C:\Users\yeeca\Desktop\DMM Auto\node_modules@vladfrangu\async_event_emitter\dist\index.js:282:31) at WebSocketShard.<anonymous> (C:\Users\yeeca\Desktop\DMM Auto\node_modules@discordjs\ws\dist\index.js:1103:51) at WebSocketShard.emit (C:\Users\yeeca\Desktop\DMM Auto\node_modules@vladfrangu\async_event_emitter\dist\index.js:282:31) at WebSocketShard.onMessage (C:\Users\yeeca\Desktop\DMM Auto\node_modules@discordjs\ws\dist\index.js:938:14) cause of this line command.execute(interaction)
Toast
Toast17mo ago
command isn't a thing or not imported.
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
Toast
Toast17mo ago
yea that is what i meant, by undefined
Toasty
ToastyOP17mo ago
It was just all the way up I figured it out
Want results from more Discord servers?
Add your server