Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 1.07 KB

README.md

File metadata and controls

50 lines (36 loc) · 1.07 KB

BoterbotTS

Discord bot written in TypeScript.

Install

  1. Clone the repo:
git clone https://github.com/sholtrop/boterbotTS
  1. Then install the dependencies:
cd boterbotTS && npm install
  1. Add a dev.env file with:
BOT_TOKEN=<your token here>

Never commit this file, as you would expose your bot's secret token!

  1. Run the dev setup with:
npm run dev

Deploying

Heroku

I personally use a Docker image in combination wit heroku. A heroku.yml file is included for this purpose. Set up a Heroku account, and follow the instructions here.

Docker-compose

You will need to add two files:

  • db.env with
MONGO_INITDB_ROOT_USERNAME=<any username you want>
MONGO_INITDB_ROOT_PASSWORD=<any password you want>
  • bot.env with
MONGODB_URI=<mongodb://<username from db.env>:<password from db.env>@database:27017
BOT_TOKEN=<your token here>

Then you can launch the bot with docker-compose up --build.