Baker bot is a sample app that lets you bake bread inside the oven that is Discord.
This repo is sample code for the Heroku deployment tutorial
├── commands -> sample commands
│ ├── breads.js
│ ├── cakes.js
│ ├── cookies.js
│ ├── pies.js
│ ├── createRoles.js
│ ├── setup.js
├── .env -> sample .env file
├── index.js -> main entrypoint for app
├── src
│ ├── startup.js -> slash command payload
│ ├── img
│ ├── handlers -> utility functions
│ │ ├── rng.js
│ │ ├── cache.js
│ │ ├── oven.js
├── Procfile -> heroku start
├── package.json
├── README.md
└── .gitignore
Before starting, you'll need a Discord app with the following permissions:
bot
scope (after your bot user is enabled) with theManage Roles
permissionapplications.commands
scope
⚙️ Permissions can be configured by clicking on the OAuth2 tab and using the URL Generator. After a URL is generated, you can install the app by pasting that URL into your browser and following the installation flow.
Next you'll need to configure Heroku:
- Log in to your account, or set up a new one
- Create a new app on Heroku
Next, you can configure deploys with Github. If you prefer to deploy without using Github, you can read Heroku's deployment documentation.
- In the Deploy tab, select the option to Connect this app to GitHub
- Select the branch you want to deploy your app from
💡 You can only connect Heroku apps to a single GitHub repository
Before your app can go online, you'll have to configure your Heroku environment with your Discord bot's credentials:
Add your bot’s TOKEN
, GUILD_ID
, CLIENT_ID
, and any other credentials your bot might need. More details on credentials for Baker bot can be found in the tutorial.
Next, add a Heroku buildpack to your app. Click add a buildpack to your app and configure it for NodeJS.
More information about all of the configuration steps as well as guidance on maintaining and monitoring your app can be found in the tutorial.
If you run into any problems, feel free to open an issue in this repo.