Skip to content
This repository has been archived by the owner on Sep 18, 2022. It is now read-only.

BassyBoo55/heroku-sample-app

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Heroku example app

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

bread

Features and technologies used


Project structure

├── 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

Configuring your Discord app

Before starting, you'll need a Discord app with the following permissions:

  • bot scope (after your bot user is enabled) with the Manage Roles permission
  • applications.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.

Configure Heroku

Next you'll need to configure Heroku:

create Heroku app

Connect to Github

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

add Github to Heroku app

  • Select the branch you want to deploy your app from

deploy Heroku app

💡 You can only connect Heroku apps to a single GitHub repository

Add Discord credentials

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.

Heroku config variables

Add a buildpack

Next, add a Heroku buildpack to your app. Click add a buildpack to your app and configure it for NodeJS.

Adding a buildpack

Next steps

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.

About

Example discord bot using Heroku

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.8%
  • Procfile 0.2%