Discord bot written in TypeScript.
- Clone the repo:
git clone https://github.com/sholtrop/boterbotTS
- Then install the dependencies:
cd boterbotTS && npm install
- Add a
dev.env
file with:
BOT_TOKEN=<your token here>
Never commit this file, as you would expose your bot's secret token!
- Run the dev setup with:
npm run dev
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.
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
.