select menu emoji

i don't understand this error, i added emoji but still got error !
No description
7 Replies
d.js toolkit
d.js toolkit17mo 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!
bavtrungdai
bavtrungdaiOP17mo ago
14.12.1 @dmitrybatkovich why u dont support me Im newbie
Dmitry Batkovich
Dmitry Batkovich17mo ago
I'm also hi!
d.js docs
d.js docs17mo ago
To share long code snippets use a service like gist, sourcebin, starbin, or similar instead of posting them as large code blocks.
bavtrungdai
bavtrungdaiOP17mo ago
what error in my code
No description
bavtrungdai
bavtrungdaiOP17mo ago
node:events:491
throw er; // Unhandled 'error' event
^

TypeError: Cannot destructure property 'emoji' of 'selectMenuOption' as it is undefined.
at Function.normalizeEmoji (C:\Users\Khoi Minh\Downloads\Stock shop\node_modules\discord.js\src\structures\StringSelectMenuBuilder.js:36:13)
at C:\Users\Khoi Minh\Downloads\Stock shop\node_modules\discord.js\src\structures\StringSelectMenuBuilder.js:49:91
at Array.map (<anonymous>)
at StringSelectMenuBuilder.addOptions (C:\Users\Khoi Minh\Downloads\Stock shop\node_modules\discord.js\src\structures\StringSelectMenuBuilder.js:49:53)
at Client.<anonymous> (C:\Users\Khoi Minh\Downloads\Stock shop\backup.js:287:6)
at Client.emit (node:events:525:35)
at InteractionCreateAction.handle (C:\Users\Khoi Minh\Downloads\Stock shop\node_modules\discord.js\src\client\actions\InteractionCreate.js:97:12)
at Object.module.exports [as INTERACTION_CREATE] (C:\Users\Khoi Minh\Downloads\Stock shop\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (C:\Users\Khoi Minh\Downloads\Stock shop\node_modules\discord.js\src\client\websocket\WebSocketManager.js:355:31)
at WebSocketManager.<anonymous> (C:\Users\Khoi Minh\Downloads\Stock shop\node_modules\discord.js\src\client\websocket\WebSocketManager.js:239:12)
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:394:10)
at processTicksAndRejections (node:internal/process/task_queues:85:21)
node:events:491
throw er; // Unhandled 'error' event
^

TypeError: Cannot destructure property 'emoji' of 'selectMenuOption' as it is undefined.
at Function.normalizeEmoji (C:\Users\Khoi Minh\Downloads\Stock shop\node_modules\discord.js\src\structures\StringSelectMenuBuilder.js:36:13)
at C:\Users\Khoi Minh\Downloads\Stock shop\node_modules\discord.js\src\structures\StringSelectMenuBuilder.js:49:91
at Array.map (<anonymous>)
at StringSelectMenuBuilder.addOptions (C:\Users\Khoi Minh\Downloads\Stock shop\node_modules\discord.js\src\structures\StringSelectMenuBuilder.js:49:53)
at Client.<anonymous> (C:\Users\Khoi Minh\Downloads\Stock shop\backup.js:287:6)
at Client.emit (node:events:525:35)
at InteractionCreateAction.handle (C:\Users\Khoi Minh\Downloads\Stock shop\node_modules\discord.js\src\client\actions\InteractionCreate.js:97:12)
at Object.module.exports [as INTERACTION_CREATE] (C:\Users\Khoi Minh\Downloads\Stock shop\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (C:\Users\Khoi Minh\Downloads\Stock shop\node_modules\discord.js\src\client\websocket\WebSocketManager.js:355:31)
at WebSocketManager.<anonymous> (C:\Users\Khoi Minh\Downloads\Stock shop\node_modules\discord.js\src\client\websocket\WebSocketManager.js:239:12)
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:394:10)
at processTicksAndRejections (node:internal/process/task_queues:85:21)
I do not really understand *you need to return the OptionBuilder from the arrow function.
bavtrungdai
bavtrungdaiOP17mo ago
right?
No description
Want results from more Discord servers?
Add your server