Comments (1)
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 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). 👍
from discord.js-bot-development.
Related Issues (20)
- TypeError: Cannot read property 'toLowerCase' of undefined - Episode 2 HOT 3
- Changing promptMessage to respond to text instead of reactions
- My bot responds to any prefix??? HOT 2
- SyntaxError: Identifier 'client' has already been declared HOT 2
- TypeError: Cannot read property 'forEach' of undefined. Episode 03 HOT 5
- message.guild.channels.find is not a function
- Embed color doesn't change from black to white. HOT 1
- episode 4 is online but when i write command.... HOT 1
- Ep_15 Missing
- Nodejs v12 Updates HOT 2
- Prefix error HOT 1
- is this code of the old youtube discord.js series? HOT 1
- where is the `clearReactions` function defined? HOT 2
- TypeError: Cannot read property 'user' of undefined
- Gc
- cannot find the property of name of undefined? HOT 2
- 24th epesoide.
- Package
- Bot
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from discord.js-bot-development.