AutoPruner is a simple Discord bot that allows you to prune members on a customizable interval. A hosted version of AutoPruner can be invited here. The support server is located here.
This is the recommended way to self-host AutoPruner. The stack has three services:
database: PostgreSQL 18migrate: a one-shot container that applies database migrationsbot: AutoPruner itself
Copy .env.example to .env and fill in DISCORD_TOKEN and APPLICATION_ID, then:
docker compose up -dThe database is provisioned from POSTGRES_USER, POSTGRES_PASSWORD and POSTGRES_DB. Leave DATABASE_URL empty to use the bundled database.
To follow the logs:
docker compose logs -f botMigrations run on every docker compose up. To run them on their own:
docker compose run --rm migratePrerequisites:
- Install Bun on your machine.
- Have a PostgreSQL database available and set
DATABASE_URLto its connection string.
bun install
bun run db:generate
bun run db:migrate
bun run startTo register the slash commands:
bun run deployThis project is licensed under the MIT License(LICENSE.md).