A custom bot designed for The Anti-Car Collective Discord server. The bot is designed for general use and can be invited to other servers here.
Required environment variables must be configured in a .env
file at the project's root.
Environment Variable | Required | Default Value | Notes |
---|---|---|---|
DISCORD_TOKEN | ✅ | Create Discord Token | |
ENABLE_CARSIZED | ❌ | IIF value is true then /carsized is enabled |
|
EXPRESS_PORT | ❌ | 8080 | |
PINO_LEVEL | ❌ | info | silent , fatal , error , warn , info , debug , trace |
POSTGRESQL_HOST | ❌ | postgres | |
POSTGRESQL_PORT | ❌ | 5432 | |
POSTGRESQL_DATABASE | ❌ | db | |
POSTGRESQL_USER | ❌ | user | |
POSTGRESQL_PASSWORD | ❌ | password | |
POSTGRESQL_SSL | ❌ | false | |
POSTGRESQL_SSL_CA | ❌ | ./ca.crt | |
PROJECT_NAME | ❌ | Pedestrian | |
REDIS_HOST | ❌ | redis | |
REDIS_PORT | ❌ | 6379 | |
REDIS_CLUSTER | ❌ | IIF value is true then Redis will run in cluster mode |
|
REDIS_USERNAME | ❌ | ||
REDIS_PASSWORD | ❌ | ||
YOUTUBE_API_KEY | ✅ | Create YouTube API Key |
Simply run npm start
! If the above requirements are met then the project will automatically be built and deployed locally along with required dependencies and services.
Steps 1-3 is not required if the ask is already installed, updated, and/or running.
- Run third-party services (
npm run services
) - Install dependencies (
npm install
) - Build project (
npm run build
) - Attach debugger while running
npm run debug
Additional environment variables can be configured in a .env.debug
file at the project's root; for example, setting REDIS_HOST
and POSTGRESQL_HOST
to localhost
is a common debug requirement.
It is recommended to dump (npm run dump
) the database before migrating (npm run migrate
) in case restoring (npm run restore
) is required.
Tests (npm test
) must pass for any changes to be merged: