Telegram bot for adding a Fyysikkospeksi related frame to user's profile picture.
Forked from EinariTuukkanen/telegram-bots.
Code licensed under MIT license and pictures under CC0 1.0.
- Make a
.env
-file containingTAULUBOT_TOKEN
and the corresponding token. - Run Docker with
Optionally, to override the frame images, you can mount a folder with your images to
docker run -d --restart unless-stopped --env-file .env ghcr.io/fyysikkokilta/fyysikkospeksi-taulubot:main
/taulu/taulubot/images
. Mounting the current folder as read-only works as follows:docker run -d --volume ${pwd}:/taulu/taulubot/images:ro --env-file .env ghcr.io/fyysikkokilta/fyysikkospeksi-taulubot:main
- Install dependencies w/
pip install -e .
- Set the
TAULUBOT_TOKEN
environment variableexport TAULUBOT_TOKEN=1234:abcedf
- Start the bot with
python taulubot/main.py
Instead of 3. one can alternatively open a Python shell and run
from taulubot.main import main
main()
- Clone the repo
- Install dependencies
(optional) or the testing dependencies as well
pip install -e .
pip install -e .[test]
- Start coding!
Testing requires valid TAULUBOT_TOKEN_TEST, TELEGRAM_APP_ID, TELEGRAM_APP_HASH, and TELETHON_SESSION environment variables. Refer to this guide on how to generate them. After these are set up, tests can be run with:
pytest tests