mirror of
https://github.com/miloszowi/everyone-mention-telegram-bot.git
synced 2025-05-20 09:14:07 +00:00
2.7 KiB
Executable File
2.7 KiB
Executable File
simple, but useful telegram bot to gather all of group members attention!
Contents
Getting started
Installation
git clone https://github.com/miloszowi/everyone-mention-telegram-bot.git
pip install -r requirements.txt
python entrypoint.py
Requirements
python
with version specified inruntime.txt
pip
with version20.0.2
Env files
First, copy env files for database and app containers
cp docker/config/app/app.dist.env docker/config/app/app.env
cp docker/config/database/database.dist.env docker/config/app/app.env
and then fulfill copied .env
files with required values
app.env
bot_token
- your telegram bot token from BotFatherMONGODB_DATABASE
- MongoDB database nameMONGODB_USERNAME
- MongoDB usernameMONGODB_PASSWORD
- MongoDB passwordMONGODB_HOSTNAME
- MongoDB host (defaultdatabase
- container name)MONGODB_PORT
- MongoDB port (defaultport
- given in docker-compose configuration)
database.env
MONGO_INITDB_ROOT_USERNAME
- conf fromapp.env
MONGO_INITDB_ROOT_PASSWORD
- conf fromapp.env
MONGO_INITDB_DATABASE
- conf fromapp.env
MONGODB_DATA_DIR
- directory to store MongoDB documents (inside a container)MONDODB_LOG_DIR
- log file
Commands
/in
Will sign you in for everyone-mentions.
If you have already opted-in before, alternative reply will be displayed.
/out
Will sign you off for everyone-mentions.
If you haven't opted-in before, alternative reply will be displayed.
/everone
Will mention everyone that opted-in for everyone-mentions separated by spaces.
If user does not have nickname, it will assign random name from names
python library to his ID
If there are no users that opted-in for mentioning, alternative reply will be displayed.