mirror of
https://codeberg.org/nexy7574/matrix-autopin.git
synced 2026-11-03 14:16:43 +00:00
Read-only mirror of https://codeberg.org/nexy7574/matrix-autopin
- Python 98.6%
- Dockerfile 1.4%
| .forgejo/workflows | ||
| src | ||
| .gitignore | ||
| config.example.json | ||
| Dockerfile | ||
| LICENSE | ||
| README.md | ||
| requirements.txt | ||
AutoPin bot
A niobot that automatically pins messages in a channel when x number of reactions are added to it.
Usage
- Invite the bot to your room. There is a publicly hosted one,
@autopin:nexy7574.co.uk, however you probably want to host your own - Give it whatever power level you have configured that allows message pinning
- Run
!!set-threshold <number>(e.g.!!set-threshold 5) in the room you want to use it in - Get
<number>📌 reactions on a message - The bot will automatically pin the message
Installing
Docker
services:
redis:
image: redis
restart: always
volumes:
- ./redis:/data
autopin:
image: codeberg.org/nexy7574/autopin:latest
restart: always
volumes:
- ./config.json:/app/config.json:ro
depends_on:
- redis
Make sure you make sure you have the following in your config.json:
{
"redis": {
"host": "redis"
}
}
Manual
- Clone the repository
- Run
python3 -m venv venvandsource ./venv/bin/activate - Run
pip install -r requirements.txt - Make sure
redisis installed, and active - Edit your config.json
- Run
python3 src/main.py