Bot to allow pinging all users in group (@all
) (and custom aliases) in Telegram. Hosted bot: @P1ngChatBot
You can either use bare python or docker. Also, there is prometheus for metrics.
First of all you need Telegram API key and PostgreSQL database (schema defined in database.sql)
- Clone
git clone https://github.com/dzen03/P1ngChatBot.git && cd p1ngchatbot
- (Optional) Create venv
python3 -m venv venv && source venv/bin/activate
- Dependencies
pip3 install -r requirements.txt
- Fill config.py with API key and database link
- Run
python3 bot.py
- Clone
git clone https://github.com/dzen03/P1ngChatBot.git && cd p1ngchatbot
- Build
docker build -t p1ngchatbot .
- Run
docker run --env DATABASE_URL=postgresql://<your database url> --env TELEGRAM_KEY=<your API key> --name p1ngchatbot p1ngchatbot
- Add to your desired group
- Give admin privileges
- Use
/create <alias>
to create alias (for example/create all
) - Next
/opt_in <alias>
to add yourself to that alias (and everyone should do it too). (e.g./opt_in all
) - When you want to ping all users from any alias use
@<alias>
or/alias
(e.g.@all
)
If you want more info use /help