When I copy all my files into glitch and the bot starts I get the following error. My token keeps resetting every time it starts. My project is private but something keeps going wrong
Could you provide more information? The error, etc…
Oh sorry. Here’s the error
(node:5246) UnhandledPromiseRejectionWarning: Error: Incorrect login details were provided.
at WebSocketConnection.client.ws.connection.once.event (/rbd/pnpm-volume/7e8c9edd-6667-498f-b508-1f41d88ce521/node_modules/.registry.npmjs.org/discord.js/11.5.1/node_modules/discord.js/src/client/ClientManager.js:48:41)
at Object.onceWrapper (events.js:315:30)
at emitOne (events.js:116:13)
at WebSocketConnection.emit (events.js:211:7)
at WebSocketConnection.onClose (/rbd/pnpm-volume/7e8c9edd-6667-498f-b508-1f41d88ce521/node_modules/.registry.npmjs.org/discord.js/11.5.1/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:390:10)
at WebSocket.onClose (/rbd/pnpm-volume/7e8c9edd-6667-498f-b508-1f41d88ce521/node_modules/.registry.npmjs.org/ws/6.2.1/node_modules/ws/lib/event-target.js:124:16)
at emitTwo (events.js:126:13)
at WebSocket.emit (events.js:214:7)
at WebSocket.emitClose (/rbd/pnpm-volume/7e8c9edd-6667-498f-b508-1f41d88ce521/node_modules/.registry.npmjs.org/ws/6.2.1/node_modules/ws/lib/websocket.js:191:10)
at TLSSocket.socketOnClose (/rbd/pnpm-volume/7e8c9edd-6667-498f-b508-1f41d88ce521/node_modules/.registry.npmjs.org/ws/6.2.1/node_modules/ws/lib/websocket.js:850:15)
I get the following error:
(node:5246) UnhandledPromiseRejectionWarning: Error: Incorrect login details were provided.
at WebSocketConnection.client.ws.connection.once.event (/rbd/pnpm-volume/7e8c9edd-6667-498f-b508-1f41d88ce521/node_modules/.registry.npmjs.org/discord.js/11.5.1/node_modules/discord.js/src/client/ClientManager.js:48:41)
at Object.onceWrapper (events.js:315:30)
at emitOne (events.js:116:13)
at WebSocketConnection.emit (events.js:211:7)
at WebSocketConnection.onClose (/rbd/pnpm-volume/7e8c9edd-6667-498f-b508-1f41d88ce521/node_modules/.registry.npmjs.org/discord.js/11.5.1/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:390:10)
at WebSocket.onClose (/rbd/pnpm-volume/7e8c9edd-6667-498f-b508-1f41d88ce521/node_modules/.registry.npmjs.org/ws/6.2.1/node_modules/ws/lib/event-target.js:124:16)
at emitTwo (events.js:126:13)
at WebSocket.emit (events.js:214:7)
at WebSocket.emitClose (/rbd/pnpm-volume/7e8c9edd-6667-498f-b508-1f41d88ce521/node_modules/.registry.npmjs.org/ws/6.2.1/node_modules/ws/lib/websocket.js:191:10)
at TLSSocket.socketOnClose (/rbd/pnpm-volume/7e8c9edd-6667-498f-b508-1f41d88ce521/node_modules/.registry.npmjs.org/ws/6.2.1/node_modules/ws/lib/websocket.js:850:15)
I get the following error. https://pastebin.com/J4dZD5AD
@H-Hub, are you sure you copied the right token? [The bot token and not the client secret or something else]
Try putting your token into the env file and use
client.login(process.env.SECRET);
Yeah, after declaring a variable called SECRET
in the .env
and store your token there!
@x3rt I will try this, thanks. I hope it works!
@x3rt @khalby786 Thank you both <3 It worked perfectly. If I encounter more issues should I just create a new thread? Thanks!
Glad to hear that it worked