How to store the members of a server, should I?
Hello, I am working on my database right now and I was thinking about storing all the members in a server in an array within the server document (mongodb). Should I store the members of a server's ids or should I just check them all when a command the needs that info is run? if I do store them how should I go about updating them and keeping them in sync?
7 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!
- ✅
Marked as resolved by OPwhy?
what are you trying to achieve with that?
what do you need to store?
I want to make a server specific leaderboard command
so I need to know who is in the server
to filter the data
should I fetch all the guild members when the command is run or should I store them in my database and query that
you don't need to store all members though, just the ones you're tracking
this isn't djs related anyways
you should move the question to #other-js-ts
I see
sorreh
np
but that is true I only need to store the ones who use the bot
good insight