How to host a discord bot with Heroku and GitHub?
How to host a discord.py bot with Heroku and Github 1 INITIAL PROJECT DIRECTORY. This should roughly be how your project directory looks like before following this tutorial. 2 SETTING UP YOUR PROJECT DIRECTORY. Add a requirements.txt. ... 3 HOSTING ON HEROKU. Create a Github repository and upload your project onto the main branch. ...
How do I deploy a bot on Heroku?
Make sure Procfile is a File not a .txt. Create a Github repository and upload your project onto the main branch. Make a new app for your bot on Heroku. In the Deploy tab, connect your app to your Github repo. Search your repo and connect. 4. Deploy your app. Note: Above this section is Automatic Deployment.
What do I need to set up a discord bot?
You will need a Heroku account, Heroku CLI, Node, and a Discord account and bot token. I suggest using the Discord JS package to setup your bot and communicate with the Discord API.
How to add environment variables in Heroku?
In Heroku, it is pretty easy to add environment variables. Just follow the steps, Click on Settings under your app dashboard. Click on Reveal Config Vars. You’ll see that it opens a form with two options, one for Key and the other for value; enter your Key name the same as you mentioned in the .env file and paste the value in the Value section.