Skip to content

Discord bot written in TypeScript, using Mongoose/MongoDB.

License

Notifications You must be signed in to change notification settings

sholtrop/boterbotTS

Repository files navigation

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.

About

Discord bot written in TypeScript, using Mongoose/MongoDB.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published