How Collection() works?
collection | Collection
A Map with additional utility methods. This is used throughout discord.js rather than Arrays for anything that has an ID, for significantly improved performance and ease-of-use.
7 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.It's just a class that extends the native Map class
Can you give me an example?
const collection = new Collection() ?Is like an array but better?
To improved performance
Look at the embed from your link
A Map with additional utility methods. This is used throughout discord.js rather than Arrays for anything that has an ID, for significantly improved performance and ease-of-use.
ok, thanks