[opinion needed] Splitting data fetching to repositories
š
ā ļø I post that here because it a way related to djs but isn't a problem with djs itself, more a reflexion of structuration. Feel free to told me if it's
I was wondering if it would be usefull/not overkill to split data fecthing (from an DB using an ORM, external REST API using a librairy etc) and slash command code ? for example a commands/test.js that handle /test slash command and thus test.js use repositories/testRepository.js file (wich are a class/collection functions that use an lib to call external api)
I'm open to any opinion and suggestion !
Thx
2 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!I close that post in favor of #[opinion needed] Splitting data fetching to repositories in #other-js-ts