For telegram chat @rivne_autochat
Use next environment variables:
-
AUTOHATERBOT_TELEGRAM_TOKEN={YOUR_TOKEN}
- telegram token, required(other variables are optional and have default values)
-
AUTOHATERBOT_DELETE_TIMEOUT=180
- time before bot messages being deleted -
AUTOHATERBOT_ALLOWED_CHATS=-10010101,-10000101010
- whitelist chats. If it empty or not added to envs, whitelist mode will be turned off.
Python: Add mentioned env vars to the system environment.
Docker compose: create .env
file with env vars.
Ubuntu:
- Copy
autohater_bot.service
file to/etc/systemd/system/
- Edit it with required changes.
- Set
User
to your Ubuntu username - Set
WorkingDirectory
to the project root dir - Update ExecStart if needed. For example:
ExecStart=/bin/bash -c "export PYTHONPATH=/home/username/bot/autohater/autohater_bot; \ export AUTOHATERBOT_TELEGRAM_TOKEN=your_token_here; \ /usr/local/bin/python3.8 /home/username/bot/autohater/autohater_bot/src/main.py"
- Set
- Reload systemd
sudo systemctl daemon-reload
- Enable your new service
sudo systemctl enable autohater_bot
As a result you receive a message about successful symlink creation. - Run the service
systemctl start autohater_bot
docker-compose up -d
pip3 install -r src/requirements.txt
python main.py
- make filters and reactions configurable, add file-based storage