Glitch/Discord situation. What should I do?

So, the main problem is Glitch is having trouble logging in with the discord bot.
Command generates an error, saying that incorrect login info has been given.

After searching I found out that a lot of people have had this problem, and that its actually a known issue. But no reply to anyone else was really clear to me about what I should I actually do, and the posts I found were old (from 2018)

My original project was a remix of a simple discord bot “template”. I found that that could be the issue so I tried moving the files into a new project, but it still didn’t work.
Its a private project, name: “rawbot-discord-“

Hi @RawSauce50,

are you sure the token is valid ? have you tried to change it ? (To change it, go to the Discord developer portal).

Can you send the error message here please ?

Have a nice day.

Hey @Oxnovation, thank you for replying.
The exact error I am receiving is the following:

(node:1116) UnhandledPromiseRejectionWarning: Error: Incorrect login details were provided.
5:02 PM
at (/app/node_modules/discord.js/src/client/ClientManager.js:48:41)
5:02 PM
at Object.onceWrapper (events.js:272:13)
5:02 PM
at WebSocketConnection.emit (events.js:180:13)
5:02 PM
at WebSocketConnection.onClose (/app/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:390:10)
5:02 PM
at WebSocket.onClose (/app/node_modules/ws/lib/event-target.js:124:16)
5:02 PM
at WebSocket.emit (events.js:180:13)
5:02 PM
at WebSocket.emitClose (/app/node_modules/ws/lib/websocket.js:191:10)
5:02 PM
at TLSSocket.socketOnClose (/app/node_modules/ws/lib/websocket.js:850:15)
5:02 PM
at TLSSocket.emit (events.js:185:15)
5:02 PM
at _handle.close (net.js:541:12)
5:02 PM
(node:1116) 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: 2)
5:02 PM
(node:1116) [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.

I am completely sure the bot token is correct. I have even tried regenerating and changing it several times.
(Edit: sorry for not properly using a code block, I am on my mobile phone)

Try to add your token in the .env file like that :

SECRET=Your token

and after that try this :


I’m available for any other questions.

I did do it like that after my original post here. Still doesn’t work

That’s a good practice (especially if your code is open source!), but it wouldn’t help their problem.