Skip to content

cmdumar/chat-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Covid-19 Telegram Bot made with Ruby

Topics

Resources

Stars

Watchers

Forks

Languages