Qr code generator bot for Telegram messenger
Use next environment variables:
FASTQR_TOKEN={YOUR_TOKEN}
- telegram tokenFASTQR_INFLUX_QUERY={url}
- url to your influxDB server for storing logs, you choose not to define that env variable, if you don't need to log bot events
create .env
file and fill it with that variables and run
docker-compose up -d
-
Clone repository
git clone https://github.com/awitwicki/fastqr_bot
-
Execute
pip(3) install -r requirements.txt
to install all dependencies. -
Since 2020, python
PIL
library has changed and we should edit some code:You need to find file
{pythondir}\Lib\site-packages\amzqr\amzqr.py
and modify 85th line. Just addresample=Image.BOX
toqr.resize(...)
function: qr.resize((qr.size[0]*3, qr.size[1]*3)).save(qr_name) -> qr.resize((qr.size[0]*3, qr.size[1]*3), resample=Image.BOX).save(qr_name) line 85:qr.resize((qr.size[0]*3, qr.size[1]*3), resample=Image.BOX).save(qr_name)
Run main.py
in Python
- Python >= 3.6 (using
f""
strings ) - python-telegram-bot
- Amazing-QR