Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sholtrop/boterbotts

Discord bot written in TypeScript, using Mongoose/MongoDB.
https://github.com/sholtrop/boterbotts

Last synced: 11 days ago
JSON representation

Discord bot written in TypeScript, using Mongoose/MongoDB.

Awesome Lists containing this project

README

        

# BoterbotTS

Discord bot written in TypeScript.

## Install

1. Clone the repo:

```bash
git clone https://github.com/sholtrop/boterbotTS
```

2. Then install the dependencies:

```bash
cd boterbotTS && npm install
```
3. Add a `dev.env` file with:

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

4. Run the dev setup with:

```bash
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](https://devcenter.heroku.com/articles/build-docker-images-heroku-yml).

### Docker-compose
You will need to add two files:
- db.env with

```
MONGO_INITDB_ROOT_USERNAME=
MONGO_INITDB_ROOT_PASSWORD=
```

- bot.env with
```
MONGODB_URI=:@database:27017
BOT_TOKEN=
```
Then you can launch the bot with `docker-compose up --build`.