Glidias / fechtbot

FechtBot: A Discord Bot to manage turn/phase-based tabletop RPG combat among online players

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fechtbot

FechtBot: A Discord Bot to manage turn/phase-based tabletop RPG combat online players

View wiki link for bot invite link and other related links:

https://github.com/Glidias/fechtbot/wiki

Deploying to Heroku

CLI Method

Ensure you have Heroku CLI installed

  1. Login to heroku via the CLI
$ heroku login
  1. Create a new heroku app
$ heroku create
  1. Before pushing to heroku, you need to set up the config variables in other words the env variables you would use locally

    i. Go to Settings -> Reveal Config Vars

    ii. Add the config variables according to the .env.example

    iii. These Include

    DATABASE_URL
    TOKEN
    PREFIX
    NPM_CONFIG_PRODUCTION (Must be false)

    iv. Ensure that you add NPM_CONFIG_PRODUCTION to false to allow installation of dev dependencies for post build to work correctly

  2. Commit any changes and push your code from local repo to your git

$ git add -A 
$ git commit -m "message here"
$ git push heroku master
  1. Open the heroku app
$ heroku open

Github method

Note: You may also connect your github repo to the heroku and add automatic deployment on push to the github repo

Configuration Setup

These configuration setups are necessary for the app to function correctly as intended. These configuration setups will be required to be added as environment variables for the server to make use of.

Local Environment Variables (.env file)

For development you will need a .env file for environmental variables. This includes:

DATABASE_URL=mongodb+srv://username:password@clusterURLEg?retryWrites=true
TOKEN=YOUR_DISCORD_BOT_TOKEN
PREFIX=THE_BOT_COMMAND_PREFIX_USED_TYPICALLY_!

MongoDB & Mongo Atlas

A MongoDB URI is needed to connect to a MongoDB connection. The easiest way to do this is to use Mongo Atlas. If you'd like to do this locally you can follow the instructions at (https://docs.mongodb.com/manual/installation/)

Mongo Atlas

  1. Select 'Build a New Cluster' and follow the prompts
  2. When the Cluster has been created, click on 'Connect'
  3. Choose your connection method, for the purposes of this application we will use 'Connect Your Application'
  4. Next you will need to grab this connection string (Standard connection string). This is the URI that will be used as an environment variable

About

FechtBot: A Discord Bot to manage turn/phase-based tabletop RPG combat among online players

License:GNU General Public License v3.0


Languages

Language:JavaScript 100.0%