Discord.Net
Discord.Net copied to clipboard
[Bug]: Discord Caching can prevent connection to the gateway
Check The Docs
- [X] I double checked the docs and couldn't find any useful information.
Verify Issue Source
- [X] I verified the issue was caused by Discord.Net.
Check your intents
- [X] I double checked that I have the required intents.
Description
Discord could possibly cache an invalid response for the /gateway
endpoint thus preventing the connection to the Gateway. Today at around 11 AM UTC Discord cached the following response for about 5 hours (depending on the geological location):
{
"global": true,
"message": "You are being rate limited.",
"retry_after": 0.77
}
thus not getting the Gateway address and not being able to connect.
My recommendation would be to either:
- Try calling the gateway endpoint with a random query argument
- Always use the
/gateway/bot
endpoint which requires authentication and thus is not cached
Version
3.x
Working Version
No response
Logs
n/a
Sample
No response
Packages
n/a
seems to be resolved
it was resolved, this issue does not target that
this issue targets a future prevention on ~~if~~ when this happens another time
a good and future-proof fix would be to use /gateway/bot
for the reason said in the issue body
Kind of a late update... Hey from 2023
The library uses /gateway/bot
, so i'm closing this.