Skip to content

robz-tirtlib/myassistant

Repository files navigation

MyAssistant

Personal assistant-bot for Telegram with the following functionality:

  • downloading content from YouTube
  • showing exchange rates
  • showing weather forecasts
  • setting reminders

Installation and setup

Note: To setup this project you have to have pip and ffmpeg installed.

At first, clone project to your local machine:

git clone https://github.com/robz-tirtlib/myassistant.git

cd into project folder:

cd myassistant

Create and activate virtual environment:

python3 -m venv .venv
. .venv/bin/activate

Install dependencies using requirements.txt:

pip install -r requirements.txt

You also need to create my_secrets.py file in which you have to specify following variables:

TOKEN='Your Telegram bot token'
DIRECTORY='Path to storage of temp files'
WEATHER_KEY='API key to access https://openweathermap.org/api'
FFMPEG_PATH='C:\\ffmpeg\\bin\\ffmpeg.exe'

Run main.py:

python3 main.py

Project showcase

To get a brief overview of available commands send /help.

drawing


  • Set reminders using calendar interface, sending timestamp and reminder text

drawing

  • Choose your city and weather mode via buttons and recieve a forecast

drawing

drawing

drawing

  • Get today's exchange rates via /valutes

drawing

  • Choose content mode (full/part) and type (video/audio) using buttons and get your content from YouTube

drawing

drawing

drawing

  • Cancel current state via /cancel command if you feel like you've done something wrong

Reflection

Building this project I got familiar with bots creation on Python via pyTelegramBotAPI library, operating SQLite database, using git, APIs and deploying to a remote Linux server.

About

Personal assistant-bot for Telegram.

Topics

Resources

Stars

Watchers

Forks

Languages