connection_timeout when using [Register a slash command against the Discord API] 's code
ok, so i m just getting started in doing discord, i open the discord.js, followed the instructions to npm installed the discord.js version fourteen ,and then i pressed these lovely code in my koa project ,
i have to use the require method instead of just import the { REST, Routes }
and it came out 'connection_timeout' error and nothing else about why this is happening nor what should i do to avoid this ,
this code have two necessary params : setToken needs the bot token , i gave ,Route.applicationcommands needs the bot's application.id,which is a bunch of number in string type to be exact . i think i run them in correctly .so ....what's wrong?
this is just a test bot , no privacy should be protected.
15 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!error is like this.
and the version is the latest version"^14.13.0"\
slow connection
ok just for the record ,what should i do ? i have the vpn called the ...v2ray? or something ? redirect america probably near silicon valley? atleast that;s what the ip says the last time i parse it ..
so should i use an vpn or ?
no, routing through more places does not make your connection quicker
Im not even sure this is djs? I dont see it in the stack trace
yeah ,but ,i mean , this does comes from the ...wait a minute you think i accidently used some whatnaughts apis comes from no where instead of the rest from discord.js i required? ill check
no im using that im sure of it
what?
yes but it does comes from the rest api discord.js provided me ..so ...
I cant follow what youre saying
ConnectTimeoutError: Connect Timeout Error
at onConnectTimeout (D:\webstorm_projects\koa-gpt-xcx\node_modules\undici\lib\core\connect.js:182:24)
at D:\webstorm_projects\koa-gpt-xcx\node_modules\undici\lib\core\connect.js:129:46
at Immediate._onImmediate (D:\webstorm_projects\koa-gpt-xcx\node_modules\undici\lib\core\connect.js:168:33)
at processImmediate (node:internal/timers:466:21) {
code: 'UND_ERR_CONNECT_TIMEOUT'
}
all the stack trace gave me
yeah, no mention of discord.js there
You might have an ssl issue?
but the error a hundred percent came from the put request ..
If other apis in the project works perfectly in or out ... how do i know its a ssl issue ?
how do i find it?
its a network-related issue, whether your connection is slow or not reachable it's still not djs related
just dont use vpns as they're completely useless when dealing with these situations
Unknown User•15mo ago
Message Not Public
Sign In & Join Server To View