Select menu weird bahavior
(reposted from #djs-help-v14 due to no respond for 10 minutes)
Hello guys, I am back
I have a problem getting my dynamic select menu mapping function to work
Here's the error
And here's the function code:
33 Replies
• 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.
I have tried:
- changing from ':emoji' to {name:'emoji'}
- adding a "Unknown" option incase some are not found
- my discord.js version is v14.11.0
- my node version is v18.2.0
First. Why are you spreading the object again to map it ?
Second. That's a rather inefficient way to handle it.
what
true im writing inefficient code
Third. That string select menu builder doesn't have an ID which is required
ohhhhhh i forgor custom_id
lemme try
i forgor everything in that select menu but not the options
You don't need to use the spread operator here.
...
Inside the function it's a normal array that you can work with.oh
But that's basic JS
i see that in the docs they doesnt pass an array, they pass multiple arguments of options
so i did that
eh...
What the.... Well that's another problem in your code.
A broken loop or an abused command without checks
¯\_(ツ)_/¯
its junk when testing
so i now got this error
which is way too large
dont ask why i ping @ everyone
Looks like overlooked your emoji problem
h
ok
Why are you using the name attribute for default emojis ?
lemme regex it backward
You can just pass it without having to use that
.setEmoji('💖')
yes i dont know the cause of that error so i was thinking is it caused by this
The error was caused by the emoji mate
no i mean the first error
k i did it
do i need to parse emoji to unicode emoji?
It's better to do that yes
Like how I did
If you're in windows 11
Flag+v
should give you access to all unicode emojis
oh waitits paste...
k i found it
uhh flag+v doesnt behave normally in vscode
lemme do from discord
That's strange. I do it all the time from within either way works
done
So it worked ?
Nice
🎉 tysm