Skip to content

thinc-org/thinc-discord-bot

Repository files navigation

Thinc. Discord Bot

Discord bot for the Thinc. Discord server.

Table of Contents

Available Commands

Prefix Commands

  • !start - Initialize the bot in the current Discord's guild.

Slash Commands

  • /ping - Check if the bot is alive.
  • /register - Register a new user to the Discord's guild.

Contributing

Pre-requisites

Development

  1. Clone the repository

    git clone https://github.com/thinc-org/thinc-discord-bot.git
  2. Install dependencies

    pnpm install
  3. Run PostgreSQL database using Docker Compose

    docker compose up -d
  4. Prepare environment variables

    cp .env.sample .env
  5. Create a new Discord Application to obtain Discord bot token, follow the Writebots guideguide.

  6. Invite the bot to your Discord server, follow the Writebots guide

  7. Run the bot in development mode

    pnpm start:dev

Deployment

Push the code to the main branch, the bot will be automatically deployed to Thinc. server.

Docker

To migrate the database, run the following command:

docker run -e DATABASE_URL=... --rm ghcr.io/thinc-org/thinc-discord-bot pnpm prisma migrate dev

To run the bot in production mode, run the following command:

docker run --env-file .env ghcr.io/thinc-org/thinc-discord-bot

You need to provide the environment variables in .env file.

License

MIT