Discord bot for the Thinc. Discord server.
!start
- Initialize the bot in the current Discord's guild.
/ping
- Check if the bot is alive./register
- Register a new user to the Discord's guild.
- Node.js (v16.6.0 or higher)
- PNPM (v7.12.0 or higher)
- [NestJS Basics][https://docs.nestjs.com/]
-
Clone the repository
git clone https://github.com/thinc-org/thinc-discord-bot.git
-
Install dependencies
pnpm install
-
Run PostgreSQL database using Docker Compose
docker compose up -d
-
Prepare environment variables
cp .env.sample .env
-
Create a new Discord Application to obtain Discord bot token, follow the Writebots guideguide.
-
Invite the bot to your Discord server, follow the Writebots guide
-
Run the bot in development mode
pnpm start:dev
Push the code to the main
branch, the bot will be automatically deployed to Thinc. server.
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.
MIT