Skip to content

Ambro17/AmbroBot

Repository files navigation

CuervoBot

CuervoBot is a Bot that learns new commands as i get more things to study. Studying sometimes is boring. Coding is always fun (and a good excuse to not feel guilty about not studying).

It can set reminders, search series or movies for you, tell you if you should take the subway or not, and even help you solve system of linear equations!

Installation

First clone the project and install requirements.

$ git clone https://github.com/Ambro17/AmbroBot.git
$ cd AmbroBot
$ pip install -r requirements.txt

Then open telegram and chat @BotFather to get a bot token. Once you have it add PYTEL environment variable with the token. For example, if you use Linux with zsh shell you should add this line to the end of your ~/.zshrc file

export PYTEL=<BotToken>

If you are on windows you can do it with a GUI, or with powershell. See this link for instructions

Additional environment variables are needed for the bot to work properly.

TMDB_KEY # To access movies and series
DATABASE_URL # Database to persist information
CABA_SECRET # Transport updates
CABA_CLI_ID # Transport updates

Once you have all packages installed and all environment variables set you can run the bot with

$ python3 main.py

Bot in action

Search series by name

/serie Sherlock

Serie output

Search movie by name

/pelicula The Matrix 2

Movie output

Get yts latest movies

/yts

Yts movies

Get subte status of Buenos Aires City

/subte

Subte status

or if you want to receive updates without needing to ask every time.. /suscribe <line_letter>

Commands List

/partido

Outputs San Lorenzo's next match

/dolar

Outputs USD->ARS exchange rates from different banks.

/remind <something>

Set reminders of todo tasks with recurrent notifications

/rofex

Outputs the rofex expected USD->ARS exchange rate in the following months

/posiciones

Outputs Liga Argentina standings

/subte

Outputs status of CABA subway lines.

/cartelera

Outputs the most popular movies available at the cinemas

/hoypido

Outputs hoypido food offers of the week

/pelicula <pelicula>

Outputs rating, description and imdb, yt and .torrent links to the requested movie.

/serie <serie>

Outputs all series episodes along with small description of the series.

/yts

Show latest movies added on yts.ag

/feriados

Show next feriados for Argentina

/aproximar

Determine solution of diagonally dominant system of linear equations via Jacobi or Gauss Seidel iterative methods

/suscribe <line>

Suscribe to the updates of the subway line <line> on CABA. You will receive notifications of delays, suspensions, service normalization, etc.

/yttomp3

Given a youtube url, download its audio in the best quality available. Useful if you want to make your own ringtones 🎶

/feedback

Give feedback for the bot. Bugs, feature requests, questions, ideas, nuclear secrets, conspiracy theories, or whatever you feel worth sharing with the dev.

Extra for the curious

Feedback was received from diffferent users that use AmbroBot source code to create nice keyboard layouts/more complex callback interactions. As a consecuence, i decided to leave master branch as is with no further changes as it uses the ptb api 'the right way'. Nevertheless, on style-improvements branch you can peek on a custom decorator that automagically adds handlers just by decorating handler functions avoiding boilerplate code. It's really handy!

Credits

Feel free to modify this code to suit your needs. If you get inspired by this bot please reference this repo as source of inspiration. ⭐️ Stars, 🐞 issues and 🔀 PRs are appreciated!

About

🤖 Telegram bot to suit my needs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages