Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/amgelo563/hermes-bot

A Discord bot for publishing service offers and requests.
https://github.com/amgelo563/hermes-bot

bot discord discord-bot discord-js typescript

Last synced: 3 months ago
JSON representation

A Discord bot for publishing service offers and requests.

Awesome Lists containing this project

README

        

# hermes-bot

A Discord.js bot for services publishing, made with [nyx](https://github.com/nyx-discord/nyx).

## Features

### Service Offers and Requests (Services)

* Publishing services with a user friendly interface, giving a preview of the service and warnings or denied
requirements. Also allows editing and deleting offers, as well as republishing them.
* Configurable requirements that the user or published service must meet (denying the creation otherwise) or should
meet (warning the user otherwise).

## Messages

* Completely configurable messages for every bot component (no hardcoded messages).
* Supports multiple languages, allowing to select one in the config.
* Powerful placeholder system to display information in messages.
* Uses the powerful HOCON syntax, allowing for easy reusability.

## Setting up

### Manual installation

1. Copy one of the templates in `./example-config` and paste it as `./config`, then edit it accordingly.
2. Optionally, change the datasource provider in `prisma/schema.prisma` to `mysql`, `postgresql` or `sqlite` (default).
3. Create a `.env` file with the following content:

```bash
# For MySQL: mysql://user:password@host:port/database
# For PostgreSQL: postgresql://user:password@host:port/database
# For SQLite: file:./.db, relative to ./prisma. For example: file:../database.db
DATABASE_URL=The connection URL to your database.
```

4. Run `pnpm install` to install the dependencies, `pnpm build` to build the bot and `pnpm start` to start it.

### Docker

Alternatively, use the provided Dockerfile:

```bash
# Build the image (only once or after updating)
docker build -t hermes-bot .

# Start the bot, mounting the config directory
docker run --name hermes-bot --mount type=bind,source="$(pwd)"/config,target=/usr/src/app/config -d hermes-bot

# Use `docker restart hermes-bot` to restart the bot after doing changes in config.
```

Keep in mind that you still need to follow the first step in the manual installation.

### Post installation

When starting, you can use the `--deploy` flag if you want it to deploy commands. For example:

```bash
pnpm start --deploy
```

Or when running with Docker:

```bash
docker run --name hermes-bot --mount type=bind,source="$(pwd)"/config,target=/usr/src/app/config -d hermes-bot --deploy
```