mirror of
https://github.com/BluemediaDev/discord-cleanup-bot.git
synced 2024-12-26 05:33:16 +01:00
.woodpecker | ||
.gitignore | ||
bot.py | ||
docker-compose.yaml | ||
Dockerfile | ||
LICENSE | ||
models.py | ||
README.md | ||
requirements.txt |
discord-cleanup-bot
A simple discord bot to clean up messages in a channel after a configured amount of time.
Limitations / special features
- Only messages not older than 14 days can be deleted
- Threads are not processed by the bot
- Pinned messages are excluded from deletion
Setup using Docker
Using Docker is the easiest way to use this bot:
- Copy the
docker-compose.yaml
to your server - Create a bot account using this guide (ignore the "Inviting Your Bot" section - the bot will show you the correct invite link later)
- Paste your bot token behind
BOT_TOKEN=
in thedocker-compose.yaml
- Start the container using
docker compose up -d
- Run
docker compose logs
and copy the invite link to your browser
Manual setup
If you don't want to use Docker, you can set up the bot manually:
- Clone the Git repo
- Create and activate a new venv
- Install the requirements using
requirements.txt
- Create a bot account using this guide (ignore the "Inviting Your Bot" section - the bot will show you the correct invite link later)
- Set your bot token in the environment variable
BOT_TOKEN
and specify a file path for the SQLite database usingDB_PATH
- Start the
bot.py
script - Copy the invite link to your browser
Commands
All commands provide help messages and support auto-completion.
/purge (days)
Delete all messages of the last x days now an only once./retention [get|set|disable] (retention_period)
Manage continous cleanup. The background job runs every 15 minutes.