Caching all guild entitlements for a process-sharded bot
What's the recommended approach for caching entitlements for all servers on a bot using process sharding? Some use cases I'm looking to support require validating entitlement access outside of an interaction context, and it seems that unfortunately a guild's entitlements are not included in guild create gateway events. The inclusion of entitlements in interaction contexts seems to suggest that you shouldn't have to store entitlements externally. What's the recommended approach here? (Is it just to call client.application.entitlements.fetch() on startup since the gateway events should update the cache?)
3 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!Did you ever find a solution to this? I'm also running into this issue
I was also wondering this