Replaying missed events after shutdown
Does d.js expose any way to replay events missed due to a temporary shutdown?
The TLDR is that our host will perform automatic relocation for load balancing every so often, and we'd like to replay events missed from this procedure. This would be a full application restart, not just a gateway reconnect, so I'm not sure if it's possible.
Here's the gateway docs for this feature https://discord.com/developers/docs/topics/gateway-events#resume. It would be trivial for us to persist the fields required in this request if d.js gives us access (session and sequence information).
2 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.└── [email protected], as specified. the rest is not relevant.
this is fine, so long as djs exposes it
can i just use fetchers everywhere instead of relying on cache explicitly to subvert this issue?
the codebase is fully async so this should be doable
hmm
do you have examples of methods that rely on this, just to gague how annoying it would be?
hmm
do you get sent this data with interactions?
and will it be cached by djs when it gets the interaction
i see
if i use core and such do i get type safety with all these missing bits
alright, cool, thanks for the help!