You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I click run my bot runs for 1 second then just stops running I've read some of the error code (don't really understand it) but I found can't find .env.
The text was updated successfully, but these errors were encountered:
So basically, when you host on Glitch, you must have a file called .env (this file is created by Glitch on the creation of a new express app by default). This file is used to keep certain variables secret. These variables are stored inside an object called env which is stored inside another object called process. You can access your secret variables via process.env.
Here's a reference:
Here's how to access your variable:
client.login(process.env.TOKEN);
This means your index.js file doesn't need to look after .env file. If this wasn't the right solution to your question please comment with the error message you're getting (possibly with some references too). 👍
When I click run my bot runs for 1 second then just stops running I've read some of the error code (don't really understand it) but I found can't find .env.
The text was updated successfully, but these errors were encountered: