Giter VIP home page Giter VIP logo

ambrobot's Introduction

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!

ambrobot's People

Contributors

ambro17 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.