This repo is a discord bot for Epita, use to detect and show mistake for student's messages.
Create a text file name .env
at the root of the project
touch .env
And fill it with these lines
# Postgres
POSTGRES_USER=voltbot
POSTGRES_PASSWORD=<YOUR_DATABASE_PASSWORD>
POSTGRES_PORT=5432
POSTGRES_DB=${POSTGRES_USER}
PGDATA=/var/lib/postgresql/data
# Prisma
DATABASE_TYPE=postgresql
DATABASE_USER=${POSTGRES_USER}
DATABASE_PASSWORD=${POSTGRES_PASSWORD}
DATABASE_HOST=localhost
DATABASE_PORT=${POSTGRES_PORT}
DATABASE_DB=${POSTGRES_DB}
DATABASE_URL="${DATABASE_TYPE}://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DB}?schema=public"
# Discord
DISCORD_TOKEN="<YOUR_DISCORD_BOT_TOKEN>"
There are 2 ways possible:
# Launch docker-compose in --detach mode
docker-compose up -d
You need to manually setup your postgresql database and then:
# Install Package
npm install
# Migrate Database
npx prisma generate
# Launch it
npm start