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.
image.png
image.png
image.png
image.png
Was this page helpful?