Bot error. i need help

(node:317) UnhandledPromiseRejectionWarning: Error [TOKEN_INVALID]: An invalid token was provided.

4:55 AM

at WebSocketManager.connect (/rbd/pnpm-volume/253767ab-6aa8-4fa2-867a-029b7df379f6/node_modules/.registry.npmjs.org/discord.js/12.0.1/node_modules/discord.js/src/client/websocket/WebSocketManager.js:135:26)

4:55 AM

at Client.login (/rbd/pnpm-volume/253767ab-6aa8-4fa2-867a-029b7df379f6/node_modules/.registry.npmjs.org/discord.js/12.0.1/node_modules/discord.js/src/client/Client.js:220:21)

4:55 AM

at process.runNextTicks [as _tickCallback] (internal/process/task_queues.js:54:5)

4:55 AM

at Function.Module.runMain (internal/modules/cjs/loader.js:828:11)

4:55 AM

at internal/main/run_main_module.js:17:11

4:55 AM

(node:317) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)

4:55 AM

(node:317) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

4:55 AM

You provided an invalid token to your client.login() function.

I faced same problem few mins ago, look:
Go to

Create new bot
From left wing choose “Bot”
Add Bot

And HERE take your token
Cheers :*

You provided the invalid token. Go to here and click on your application then bot and copy the token and paste into the client.login(‘YOURTOKEN’) line.

1 Like

Didn’t work.