#UND_ERR_CONNECT_TIMEOUT
13 messages · Page 1 of 1 (latest)
- 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 OP
Pinging the server doesn’t fix anything. It would help you determine the cause though
Please add the following code to your code base outside of any other event listeners and provide the full log output relevant to your issue.
client
.on("debug", console.log)
.on("warn", console.log)
- Note: if you initialize your Client as
botor other identifiers you need to use these instead ofclient - If the output is too long to post consider using a bin instead: gist | paste.gg | sourceb.in | hastebin
This might help too
wss://gateway.discord.gg/?v=10&encoding=json would be the URL you‘d want to try to connect to to check
Told me this:
[WS => Manager] Manager was destroyed:
at WebSocketManager.destroy (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:327:30)
at ExtendedClient.destroy (/home/container/node_modules/discord.js/src/client/Client.js:253:19)
at ExtendedClient.login (/home/container/node_modules/discord.js/src/client/Client.js:231:18)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
/home/container/node_modules/undici/lib/core/connect.js:186
util.destroy(socket, new ConnectTimeoutError())
^
ConnectTimeoutError: Connect Timeout Error
at onConnectTimeout (/home/container/node_modules/undici/lib/core/connect.js:186:24)
at /home/container/node_modules/undici/lib/core/connect.js:133:46
at Immediate._onImmediate (/home/container/node_modules/undici/lib/core/connect.js:174:9)
That looks like you indeed got cloudflare banned. And if it‘s a dedicated server like you said it was that means that your bot code caused too many 401, 403 or 429 responses in a short amount of time
So how would I fix it
By not causing those errors…
Rate Limits - Invalid Request Limit aka CloudFlare bans
read more
How did you manage to cause 10k invalid calls within 10 minutes?
IP addresses that make too many invalid HTTP requests are automatically and temporarily restricted from accessing the Discord API. Currently, this limit is 10,000 per 10 minutes. An invalid request is one that results in 401, 403, or 429 statuses.
One way is retrying a request on error in a loop