Git Product home page Git Product logo

chat-bot's Introduction

Telegram Bot

GitHub Workflow Status GitHub Workflow Status

A Telegram Bot built using Ruby. Get statistics and updates about Covid-19 for any country and the latest weather forecast for cities worldwide.

screenshot

Before Running The Project

If you want to run the project locally in your machine, then you need to obtain the API keys to run it, otherwise it will throw an error.

1. Telegram Bot Token

  • You can get the Telegram Bot Token from BotFather.

2. OpenWeather API

Run the Project Locally

  • Clone the Repo git clone https://github.com/mohammadumar28/chat-bot.git
  • Run cd chat-bot to change directory to the cloned repo.
  • In the cloned repo directory, create a .env file
  • Create 2 variables like this:
TELEGRAM_TOKEN=<Replace with Telegram Bot Token>
OPENWEATHER_API=<Replace with OpenWeather API key>
  • Run bundle install.
  • Run ruby bin/main.rb to start the bot.
  • Open the bot in a Telegram app using this link

Note:

The bot has been already deployed and running on Heroku, So running the project locally might throw an error because only 1 instance of the bot can run at a time.

Bot Features/Commands

  1. /start - Welcome Message.
  2. covid/<country-name> - Current Covid-19 stats for a country.
  3. weather/<city-name> - Latest Weather forecast for a city.
  4. /date - today's date.
  5. /help - List of all the commands and examples.

Tools/Languages Used

  • Ruby
  • RSpec
  • Heroku

Author

Muhammad Umar

Acknowledgements

Contribution

  • Fork this repo.
  • Create your feature branch git checkout -b my-new-feature.
  • Commit your changes git commit -am "Add some feature".
  • Push to the branch git push origin my-new-feature.
  • Create a new Pull Request.

chat-bot's People

Contributors

cmdumar avatar

Stargazers

 avatar  avatar

Watchers

 avatar

chat-bot's Issues

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.