Remix this project
Welcome to our interactive Discord Bot install guide! We highly recommend our intro video, after watching it you should have a general idea of what you need to do to create your Discord bot.
This Project's URL:
Create your Discord application
- A token is a secret password
- It can be used to hack your bot!
Your .env file might look complicated, but basically the format is to put your secret token after the "=". Don't add any extra spaces because that can cause errors. So let's say your Discord Bot token is PASSWORD123. Then your .env would look like:
Click here to go to your
GLITCH_DEBUGGER= # Environment Config # store your secrets and config variables in here # only invited collaborators will be able to see your .env values # reference these in your code with process.env.SECRET DISCORD_TOKEN=PASSWORD123 # note: .env is a shell file so there can't be spaces around = utm_source=starter-botkit-discord utm_medium=button utm_campaign=glitchButton
You don't want to put tokens in
server.js because by
default in Glitch anyone can see that file. And if you copy the
project, it will copy the file with the secure token. Yikes!
Sign up for Uptime Robot (OPTIONAL)
- Glitch apps automatically "sleep" after 5 minutes
- You can read more about that and other restrictions here.
- Sleeping bots drop out of any Discord servers they are in
- Sleeping bots will not respond to any messages
- Only an external request to your bot's "site" here on Glitch will wake it up
- Uptime Robot makes requests every 5 minutes to keep your bot awake!
Test your install
Click the button to see if your .env is set up right!
Looks like your token is working! Click the refresh button to refresh the page and see further steps for building your bot:
Oops look's like there might be something wrong with your
.env file. Check it out and then try again.
- Spaces between
=and the token
- Spaces after the token
- Missing your Discord Bot token
the good news is you have a good .env file the bad news is it doesn't recognize your token. Head to the Discord Developer Portal to make sure you have the right one
OK so this is awkward...but it appears this project is living on a banned host. Please post the name of this Glitch app here this support forum thread and we'll fix it asap!