Git Product home page Git Product logo

telegram-bot's Introduction

telegram-bot

Microverse ruby capstone project to build a bot

This is a solo project to build a bot by putting into practice the concepts of Object Oriented Programming (OOP) learned in Ruby Module. I have demonstrated the use of classes (and Module) in Ruby and how to access their properties and methods. Here is a brief description of my bot.

Paddy (@PaddyMyBot) is a bot built using telegram bot API. It has the ability to scrape news channels and display the latest news headlines in the user's chat. The idea behind this project is to enable fast paced individuals to be on the know by looking at news headlines.

How to use Paddy

  1. Launch telegram app
  2. Search for @PaddyMyBot
  3. Read Description and click Start
  4. Enter / to select news source
  5. View first headline
  6. Click /next command for next headline
  7. Click /stop command to end session

Built With

  • Ruby

Prerequisites

  1. Telegram account & Bot Token
  2. Terminal or command line
  3. Latest version of Ruby

Create Your Own Bot

To create your own telegram bot based on the same logic

  1. Launch Telegram and Talk to the BotFather (@BotFather)

BotFather

  1. Enter /help to see a list of commands
  2. Click /newbot command and enter bot name and username
  3. Copy your Token (or use /token or generate)
  4. Open terminal or command line
  5. Run the following commands
  • $ git clone https://github.com/francisuloko/telegram-bot.git
  • $ cd telegram-bot/
  1. Open ./lib/bot.rb and create your TOKEN variable (KEEP IT SECRET) (Or create the variable in config/token.rb)
  2. Run the following command to start your bot
  • $ ruby ./bin/main.rb
  1. Lauch Telegram and search for @your_bot
  2. Jump to How to use Paddy section is this README.

Testing with Rspec

From project directory, run the following command bundle exec rspec or rspec

Authors

๐Ÿ‘ค Author1

๐Ÿค Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a โญ๏ธ if you like this project!

Acknowledgments

  • Microverse Inc.
  • The Odin Project

๐Ÿ“ License

This project is MIT licensed.

telegram-bot's People

Contributors

francisuloko avatar

Stargazers

Guilherme Giachellin avatar Erick Contreras avatar

Watchers

 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.