Skip to content

dankerow/blop

Repository files navigation

Blop

A Discord bot made with discord.js

GitHub package.json version GitHub License

Setup

Make sure to install the dependencies:

# pnpm (default)
pnpm install
# yarn
yarn install
# npm
npm install

Rename the .env.example file to .env in the root directory and update the values:

DISCORD_CLIENT_TOKEN=your_discord_bot_token

DATABASE_URL=your_database_url # e.g. postgres://user:password@localhost:5432/database

Database

Set up a PostgreSQL database and update the DATABASE_URL in the .env file.

DATABASE_URL=your_database_url # e.g. postgres://user:password@localhost:5432/database

The bot uses Prisma to interact with the database. To set up the database, run the following command:

prisma generate

To apply the migrations, run:

prisma migrate

To generate the Prisma client, run:

prisma generate

For more information, check the Prisma documentation.

Running

pnpm start

Commands

The bot works with command modules that can be enabled and disabled. To manage them, consult modules menu via the command /modules.

  • To get more details about how to use commands, do /help <command>.
  • <> means required command parameter.
  • [] means optional command parameter.

Note: The image generation commands require the RawGO API to be deployed.

Clone the repository and follow the instructions in the README to set it up. Once the API is running, update the field apis.rawgo.baseUrl in the config file with the API URL.