View Guild Onboarding
I'm trying to see my Guild Onboarding questions and add answers to them but I'm just getting undefined for each property.
This is my code
The image is what the bot sends me
5 Replies
- 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!You're iterating over the collection incorrectly
Converting a Collection to an array
You only need to convert it to an array if you need the index of an entry:
- Iteration (looping) is possible with
for...of
over Collection#values
or forEach
- You can transform a Collection to an array with Collection#map
- If you need indices, you can get the array using [...collection.values()]
prompts.values() is what you need
Thanks
How do I add prompts?