Private Telegram bot with little functional. General idea it's telegram-interface for work with different program and RaspberryPI hardware modules. Bot was wrote use python-async methods and this approach do program faster where run I/O operations.
It's private little project for helping me in my life. If become new necessaryes, the bot will be supplemented with new functionality.
✔️ Get info about API token and admins id from yaml-file.
✔️ Send message to admin(s) if telegram bot was started.
✔️ Admin(s) ID checker in decorator. It splitting clients privileges.
✔️ Work with Privatbank API for check USD/UAH course.
✔️ Work with Exmo cryptoexchange API for check BTC/USD course.
✔️ Privatbank and Exmo have reply-format in the image.
✔️ Work with openweathermap API for weather check.
✔️ Send geoposition in chat - get coordinates in text format.
✔️ Send software/hardware platform info where it was started.
✔️ Bot-command for stop Telegram bot process.
Detail of bot-functional and examples of run commands result.
❔ Work with RaspberryPI hardware modules.
❔ Work with SQLite DB for save data.
- Clone or download project from github.
- Install python version 3.7+.
- Create and activate special venv for project:
username@linux:~$ python3.7 -m venv venv_telegram_bot
username@linux:~$ source venv_telegram_bot/bin/activate
- Upgrade
setuptools
andwheel
libs:
(venv_telegram_bot) username@linux:~$ pip install --upgrade pip setuptools wheel
- Install necessary packages from
requirements.txt
:
(venv_telegram_bot) username@linux:~$ pip install -r proj/requirements.txt
- Start Bot:
(venv_telegram_bot) username@linux:~$ python main.py
NOTE: main.py:1 should most likely be edited to fit your paths