Logger is a powerful Discord bot meant to give staff members oversight over the various actions taking place in their server. Come talk about it in the server Logger's Lounge.
This route uses Docker and a docker-compose file to bring up the required dependencies for Logger.
- Install Docker Desktop if on Windows, and regular Docker on Linux systems
- Download the bot code via
git clone
or clicking "<> Code -> Download Zip" on the GitHub page - In the bot code folder, copy/rename .env.example into .env
- Fill out the values in your .env file
- Run
docker compose up
to start the bot and dependent services. This will make two folders in the same folder that the command is ran in: pgdata and redisdata, used for storing database information. If you want to change the location that postgres and redis data is stored, check out the volume mounts indocker-compose.yml
. - Run
docker compose exec loggerbot npm run genDB
to initialize the database tables. - The bot should be up and running in Discord if all necessary values are present.
- If you have issues, check the logs for
docker compose up
. Otherwise, you're done, and can usedocker compose up -d
to run the bot in the background 24/7
If you modify the bot code, the code must be rebuilt for use with docker compose
.
Make the code changes, and use docker compose build loggerbot
to rebuild the code, then it can be started at will using docker compose up
or docker compose up -d
You are mostly on your own selfhosting. Required applications:
- PostgreSQL 14+ (no complex queries, most should work)
- Redis
- NodeJS 20+
- Setup Postgres and add a superuser (default user works)
- Clone bot repo and enter the created folder
- Copy .env.example into .env
- Fill out all fields in it (even Sentry unless you hotpatch it out)
npm install
npm run genDB
- Set
ENABLE_TEXT_COMMANDS="true"
in .env - Start the bot with
node index.js
- Use your prefix to set the bot's commands. If yours is %, then you'd do
%setcmd global
to globally set commands, and%setcmd guild
to quickly set server-specific slash commands
node index.js
NODE_ENV=production node index.js
Join the community to talk about contributions and potential help at Logger's Lounge.
Pull requests are welcome as long as it follows the following guidelines:
- Is your idea really one that a large group of moderators would like?
- Is your idea scalable?
- Will your idea cause the bot to hit it's global ratelimit?
- Have you proposed it in my support server?
If you have done all of the above steps, then open a pull request and I will review it. eventually. Run the styleguide (standard-js) against your code with npx standard --fix ./